30981d0fdd
1. Include the builtin-actors in the lotus source tree. 2. Embed the bundle on build instead of downloading at runtime. 3. Avoid reading the bundle whenever possible by including bundle metadata (the bundle CID, the actor CIDs, etc.). 4. Remove everything related to dependency injection. 1. We're no longer downloading the bundle, so doing anything ahead of time doesn't really help. 2. We register the manifests on init because, unfortunately, they're global. 3. We explicitly load the current actors bundle in the genesis state-tree method. 4. For testing, we just change the in-use bundle with a bit of a hack. It's not great, but using dependency injection doesn't make any sense either because, again, the manifest information is global. 5. Remove the bundle.toml file. Bundles may be overridden by specifying an override path in the parameters file, or an environment variable. fixes #8701
96 lines
2.3 KiB
Go
96 lines
2.3 KiB
Go
//go:build calibnet
|
|
// +build calibnet
|
|
|
|
package build
|
|
|
|
import (
|
|
"github.com/filecoin-project/go-address"
|
|
"github.com/filecoin-project/go-state-types/abi"
|
|
"github.com/filecoin-project/go-state-types/network"
|
|
"github.com/filecoin-project/lotus/chain/actors"
|
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
|
"github.com/ipfs/go-cid"
|
|
)
|
|
|
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|
0: DrandMainnet,
|
|
}
|
|
|
|
const GenesisNetworkVersion = network.Version0
|
|
|
|
var NetworkBundle = "calibrationnet"
|
|
var BundleOverrides map[actors.Version]string
|
|
|
|
const BootstrappersFile = "calibnet.pi"
|
|
const GenesisFile = "calibnet.car"
|
|
|
|
const UpgradeBreezeHeight = -1
|
|
const BreezeGasTampingDuration = 120
|
|
|
|
const UpgradeSmokeHeight = -2
|
|
|
|
const UpgradeIgnitionHeight = -3
|
|
const UpgradeRefuelHeight = -4
|
|
|
|
var UpgradeAssemblyHeight = abi.ChainEpoch(30)
|
|
|
|
const UpgradeTapeHeight = 60
|
|
|
|
const UpgradeLiftoffHeight = -5
|
|
|
|
const UpgradeKumquatHeight = 90
|
|
|
|
const UpgradeCalicoHeight = 120
|
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
|
|
|
const UpgradeClausHeight = 270
|
|
|
|
const UpgradeOrangeHeight = 300
|
|
|
|
const UpgradeTrustHeight = 330
|
|
|
|
const UpgradeNorwegianHeight = 360
|
|
|
|
const UpgradeTurboHeight = 390
|
|
|
|
const UpgradeHyperdriveHeight = 420
|
|
|
|
const UpgradeChocolateHeight = 312746
|
|
|
|
// 2022-02-10T19:23:00Z
|
|
const UpgradeOhSnapHeight = 682006
|
|
|
|
var UpgradeSkyrHeight = abi.ChainEpoch(99999999999999)
|
|
|
|
var SupportedProofTypes = []abi.RegisteredSealProof{
|
|
abi.RegisteredSealProof_StackedDrg32GiBV1,
|
|
abi.RegisteredSealProof_StackedDrg64GiBV1,
|
|
}
|
|
var ConsensusMinerMinPower = abi.NewStoragePower(32 << 30)
|
|
var MinVerifiedDealSize = abi.NewStoragePower(1 << 20)
|
|
var PreCommitChallengeDelay = abi.ChainEpoch(150)
|
|
|
|
func init() {
|
|
policy.SetSupportedProofTypes(SupportedProofTypes...)
|
|
policy.SetConsensusMinerMinPower(ConsensusMinerMinPower)
|
|
policy.SetMinVerifiedDealSize(MinVerifiedDealSize)
|
|
policy.SetPreCommitChallengeDelay(PreCommitChallengeDelay)
|
|
|
|
SetAddressNetwork(address.Testnet)
|
|
|
|
Devnet = true
|
|
|
|
BuildType = BuildCalibnet
|
|
|
|
}
|
|
|
|
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
|