Skip to content

Commit

Permalink
Merge branch 'release/v1.12.0' into jen/12-master
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Oct 11, 2021
2 parents 3a3edbb + 6e61431 commit dc820df
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 21 deletions.
3 changes: 0 additions & 3 deletions build/params_2k.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
)

const BootstrappersFile = ""
Expand Down Expand Up @@ -92,8 +91,6 @@ func init() {

BuildType |= Build2k

// To test out what this proposal would like on devnets / testnets: https://github.com/filecoin-project/FIPs/pull/190
miner6.FaultMaxAge = miner6.WPoStProvingPeriod * 42
}

const BlockDelaySecs = uint64(4)
Expand Down
4 changes: 0 additions & 4 deletions build/params_butterfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/ipfs/go-cid"
)

Expand Down Expand Up @@ -54,9 +53,6 @@ func init() {
Devnet = true

BuildType = BuildButterflynet

// To test out what this proposal would like on devnets / testnets: https://github.com/filecoin-project/FIPs/pull/190
miner6.FaultMaxAge = miner6.WPoStProvingPeriod * 42
}

const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
Expand Down
3 changes: 0 additions & 3 deletions build/params_calibnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/ipfs/go-cid"
)

Expand Down Expand Up @@ -68,8 +67,6 @@ func init() {

BuildType = BuildCalibnet

// To test out what this proposal would like on devnets / testnets: https://github.com/filecoin-project/FIPs/pull/190
miner6.FaultMaxAge = miner6.WPoStProvingPeriod * 42
}

const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
Expand Down
6 changes: 1 addition & 5 deletions build/params_interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"

"github.com/filecoin-project/lotus/chain/actors/policy"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
)

const BootstrappersFile = "interopnet.pi"
Expand Down Expand Up @@ -99,8 +97,6 @@ func init() {
SetAddressNetwork(address.Testnet)
Devnet = true

// To test out what this proposal would like on devnets / testnets: https://github.com/filecoin-project/FIPs/pull/190
miner6.FaultMaxAge = miner6.WPoStProvingPeriod * 42
}

const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
Expand Down
4 changes: 2 additions & 2 deletions build/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const UpgradeTurboHeight = 712320
// 2021-06-30T22:00:00Z
var UpgradeHyperdriveHeight = abi.ChainEpoch(892800)

// ???
var UpgradeChocolateHeight = abi.ChainEpoch(999999999)
// 2021-10-26T13:30:00Z
var UpgradeChocolateHeight = abi.ChainEpoch(1231620)

func init() {
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
Expand Down
87 changes: 87 additions & 0 deletions build/params_nerpanet.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
//go:build nerpanet
// +build nerpanet

package build

import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/ipfs/go-cid"

builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
)

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

const GenesisNetworkVersion = network.Version0

const BootstrappersFile = "nerpanet.pi"
const GenesisFile = "nerpanet.car"

const UpgradeBreezeHeight = -1
const BreezeGasTampingDuration = 0

const UpgradeSmokeHeight = -1

const UpgradeIgnitionHeight = -2
const UpgradeRefuelHeight = -3

const UpgradeLiftoffHeight = -5

const UpgradeAssemblyHeight = 30 // critical: the network can bootstrap from v1 only
const UpgradeTapeHeight = 60

const UpgradeKumquatHeight = 90

const UpgradeCalicoHeight = 100
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)

const UpgradeClausHeight = 250

const UpgradeOrangeHeight = 300

const UpgradeTrustHeight = 600
const UpgradeNorwegianHeight = 201000
const UpgradeTurboHeight = 203000
const UpgradeHyperdriveHeight = 379178

const UpgradeChocolateHeight = 999999999

func init() {
// Minimum block production power is set to 4 TiB
// Rationale is to discourage small-scale miners from trying to take over the network
// One needs to invest in ~2.3x the compute to break consensus, making it not worth it
//
// DOWNSIDE: the fake-seals need to be kept alive/protected, otherwise network will seize
//
policy.SetConsensusMinerMinPower(abi.NewStoragePower(4 << 40))

policy.SetSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg512MiBV1,
abi.RegisteredSealProof_StackedDrg32GiBV1,
abi.RegisteredSealProof_StackedDrg64GiBV1,
)

// Lower the most time-consuming parts of PoRep
policy.SetPreCommitChallengeDelay(10)

// TODO - make this a variable
//miner.WPoStChallengeLookback = abi.ChainEpoch(2)

Devnet = false

BuildType = BuildNerpanet

}

const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)

const PropagationDelaySecs = uint64(6)

// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
const BootstrapPeerThreshold = 4

var WhitelistedBlock = cid.Undef
3 changes: 2 additions & 1 deletion cmd/lotus-miner/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ var actorWithdrawCmd = &cli.Command{
fmt.Printf("Requested rewards withdrawal in message %s\n", smsg.Cid())

// wait for it to get mined into a block
fmt.Printf("waiting for %x epochs for confirmation..\n", uint64(cctx.Int("confidence")))
fmt.Printf("waiting for %d epochs for confirmation..\n", uint64(cctx.Int("confidence")))

wait, err := api.StateWaitMsg(ctx, smsg.Cid(), uint64(cctx.Int("confidence")))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
github.com/filecoin-project/specs-actors/v3 v3.1.1
github.com/filecoin-project/specs-actors/v4 v4.0.1
github.com/filecoin-project/specs-actors/v5 v5.0.4
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211001193936-c3afe7fa3c5c
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211007184712-855f60561dfc
github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506
github.com/filecoin-project/test-vectors/schema v0.0.5
github.com/gbrlsnchs/jwt/v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ github.com/filecoin-project/specs-actors/v4 v4.0.1/go.mod h1:TkHXf/l7Wyw4ZejyXIP
github.com/filecoin-project/specs-actors/v5 v5.0.0-20210512015452-4fe3889fff57/go.mod h1:283yBMMUSDB2abcjP/hhrwTkhb9h3sfM6KGrep/ZlBI=
github.com/filecoin-project/specs-actors/v5 v5.0.4 h1:OY7BdxJWlUfUFXWV/kpNBYGXNPasDIedf42T3sGx08s=
github.com/filecoin-project/specs-actors/v5 v5.0.4/go.mod h1:5BAKRAMsOOlD8+qCw4UvT/lTLInCJ3JwOWZbX8Ipwq4=
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211001193936-c3afe7fa3c5c h1:29m9oz0AP3TglBFC9Sii9M3skIAbhZhZr+2FyomSTTo=
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211001193936-c3afe7fa3c5c/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk=
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211007184712-855f60561dfc h1:1oeH5dJHNC8VdyYGfu1pr2/L86825hPiVMaV477msho=
github.com/filecoin-project/specs-actors/v6 v6.0.0-20211007184712-855f60561dfc/go.mod h1:V1AYfi5GkHXipx1mnVivoICZh3wtwPxDVuds+fbfQtk=
github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 h1:Ur/l2+6qN+lQiqjozWWc5p9UDaAMDZKTlDS98oRnlIw=
github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g=
github.com/filecoin-project/test-vectors/schema v0.0.5 h1:w3zHQhzM4pYxJDl21avXjOKBLF8egrvwUwjpT8TquDg=
Expand Down

0 comments on commit dc820df

Please sign in to comment.