Merge pull request #8716 from filecoin-project/fix/makefile-flags
build: set NetworkBundle in params file
This commit is contained in:
commit
2c3df5f187
5
Makefile
5
Makefile
@ -68,23 +68,18 @@ build-devnets: build lotus-seed lotus-shed lotus-wallet lotus-gateway lotus-foun
|
|||||||
.PHONY: build-devnets
|
.PHONY: build-devnets
|
||||||
|
|
||||||
debug: GOFLAGS+=-tags=debug
|
debug: GOFLAGS+=-tags=debug
|
||||||
debug: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=devnet
|
|
||||||
debug: build-devnets
|
debug: build-devnets
|
||||||
|
|
||||||
2k: GOFLAGS+=-tags=2k
|
2k: GOFLAGS+=-tags=2k
|
||||||
2k: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=devnet
|
|
||||||
2k: build-devnets
|
2k: build-devnets
|
||||||
|
|
||||||
calibnet: GOFLAGS+=-tags=calibnet
|
calibnet: GOFLAGS+=-tags=calibnet
|
||||||
calibnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=calibnet
|
|
||||||
calibnet: build-devnets
|
calibnet: build-devnets
|
||||||
|
|
||||||
butterflynet: GOFLAGS+=-tags=butterflynet
|
butterflynet: GOFLAGS+=-tags=butterflynet
|
||||||
butterflynet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=butterflynet
|
|
||||||
butterflynet: build-devnets
|
butterflynet: build-devnets
|
||||||
|
|
||||||
interopnet: GOFLAGS+=-tags=interopnet
|
interopnet: GOFLAGS+=-tags=interopnet
|
||||||
interopnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet
|
|
||||||
interopnet: build-devnets
|
interopnet: build-devnets
|
||||||
|
|
||||||
lotus: $(BUILD_DEPS)
|
lotus: $(BUILD_DEPS)
|
||||||
|
@ -6,23 +6,6 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/chain/actors"
|
"github.com/filecoin-project/lotus/chain/actors"
|
||||||
)
|
)
|
||||||
|
|
||||||
var NetworkBundle string
|
|
||||||
|
|
||||||
func GetNetworkBundle() string {
|
|
||||||
switch NetworkBundle {
|
|
||||||
case "devnet":
|
|
||||||
return "devnet"
|
|
||||||
case "calibnet", "calibrationnet":
|
|
||||||
return "calibrationnet"
|
|
||||||
case "butterflynet":
|
|
||||||
return "butterflynet"
|
|
||||||
case "interopnet", "caterpillarnet":
|
|
||||||
return "caterpillarnet"
|
|
||||||
default:
|
|
||||||
return "mainnet"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//go:embed bundles.toml
|
//go:embed bundles.toml
|
||||||
var BuiltinActorBundles []byte
|
var BuiltinActorBundles []byte
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
const BootstrappersFile = ""
|
const BootstrappersFile = ""
|
||||||
const GenesisFile = ""
|
const GenesisFile = ""
|
||||||
|
const NetworkBundle = "devnet"
|
||||||
|
|
||||||
const GenesisNetworkVersion = network.Version15
|
const GenesisNetworkVersion = network.Version15
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
|
|
||||||
const GenesisNetworkVersion = network.Version14
|
const GenesisNetworkVersion = network.Version14
|
||||||
|
|
||||||
|
const NetworkBundle = "butterflynet"
|
||||||
const BootstrappersFile = "butterflynet.pi"
|
const BootstrappersFile = "butterflynet.pi"
|
||||||
const GenesisFile = "butterflynet.car"
|
const GenesisFile = "butterflynet.car"
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
|
|
||||||
const GenesisNetworkVersion = network.Version0
|
const GenesisNetworkVersion = network.Version0
|
||||||
|
|
||||||
|
const NetworkBundle = "calibrationnet"
|
||||||
const BootstrappersFile = "calibnet.pi"
|
const BootstrappersFile = "calibnet.pi"
|
||||||
const GenesisFile = "calibnet.car"
|
const GenesisFile = "calibnet.car"
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import (
|
|||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const NetworkBundle = "caterpillarnet"
|
||||||
const BootstrappersFile = "interopnet.pi"
|
const BootstrappersFile = "interopnet.pi"
|
||||||
const GenesisFile = "interopnet.car"
|
const GenesisFile = "interopnet.car"
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|||||||
UpgradeSmokeHeight: DrandMainnet,
|
UpgradeSmokeHeight: DrandMainnet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const NetworkBundle = "mainnet"
|
||||||
const GenesisNetworkVersion = network.Version0
|
const GenesisNetworkVersion = network.Version0
|
||||||
|
|
||||||
const BootstrappersFile = "mainnet.pi"
|
const BootstrappersFile = "mainnet.pi"
|
||||||
|
@ -107,6 +107,7 @@ var (
|
|||||||
}
|
}
|
||||||
|
|
||||||
GenesisNetworkVersion = network.Version0
|
GenesisNetworkVersion = network.Version0
|
||||||
|
NetworkBundle = "devnet"
|
||||||
|
|
||||||
NewestNetworkVersion = network.Version15
|
NewestNetworkVersion = network.Version15
|
||||||
ActorUpgradeNetworkVersion = network.Version15
|
ActorUpgradeNetworkVersion = network.Version15
|
||||||
|
@ -72,7 +72,7 @@ func LoadBundle(ctx context.Context, bs blockstore.Blockstore, path string, av a
|
|||||||
|
|
||||||
// utility for blanket loading outside DI
|
// utility for blanket loading outside DI
|
||||||
func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[actors.Version]build.Bundle) error {
|
func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[actors.Version]build.Bundle) error {
|
||||||
netw := build.GetNetworkBundle()
|
netw := build.NetworkBundle
|
||||||
|
|
||||||
path := os.Getenv("LOTUS_PATH")
|
path := os.Getenv("LOTUS_PATH")
|
||||||
if path == "" {
|
if path == "" {
|
||||||
|
@ -25,7 +25,7 @@ func LoadBuiltinActors(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRe
|
|||||||
|
|
||||||
// We can't put it as a dep in inputs causes a stack overflow in DI from circular dependency
|
// We can't put it as a dep in inputs causes a stack overflow in DI from circular dependency
|
||||||
// So we pass it through ldflags instead
|
// So we pass it through ldflags instead
|
||||||
netw := build.GetNetworkBundle()
|
netw := build.NetworkBundle
|
||||||
|
|
||||||
for av, bd := range build.BuiltinActorReleases {
|
for av, bd := range build.BuiltinActorReleases {
|
||||||
// first check to see if we know this release
|
// first check to see if we know this release
|
||||||
|
Loading…
Reference in New Issue
Block a user