build: set NetworkBundle in params file
Otherwise, we end up overriding the ldflags. fixes #8684
This commit is contained in:
parent
5e7f5029d8
commit
496799f867
5
Makefile
5
Makefile
@ -68,23 +68,18 @@ build-devnets: build lotus-seed lotus-shed lotus-wallet lotus-gateway lotus-foun
|
||||
.PHONY: build-devnets
|
||||
|
||||
debug: GOFLAGS+=-tags=debug
|
||||
debug: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=devnet
|
||||
debug: build-devnets
|
||||
|
||||
2k: GOFLAGS+=-tags=2k
|
||||
2k: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=devnet
|
||||
2k: build-devnets
|
||||
|
||||
calibnet: GOFLAGS+=-tags=calibnet
|
||||
calibnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=calibnet
|
||||
calibnet: build-devnets
|
||||
|
||||
butterflynet: GOFLAGS+=-tags=butterflynet
|
||||
butterflynet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=butterflynet
|
||||
butterflynet: build-devnets
|
||||
|
||||
interopnet: GOFLAGS+=-tags=interopnet
|
||||
interopnet: GOFLAGS+=-ldflags=-X=github.com/filecoin-project/lotus/build.NetworkBundle=interopnet
|
||||
interopnet: build-devnets
|
||||
|
||||
lotus: $(BUILD_DEPS)
|
||||
|
@ -6,23 +6,6 @@ import (
|
||||
"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
|
||||
var BuiltinActorBundles []byte
|
||||
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
|
||||
const BootstrappersFile = ""
|
||||
const GenesisFile = ""
|
||||
const NetworkBundle = "devnet"
|
||||
|
||||
const GenesisNetworkVersion = network.Version15
|
||||
|
||||
|
@ -18,6 +18,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||
|
||||
const GenesisNetworkVersion = network.Version14
|
||||
|
||||
const NetworkBundle = "butterflynet"
|
||||
const BootstrappersFile = "butterflynet.pi"
|
||||
const GenesisFile = "butterflynet.car"
|
||||
|
||||
|
@ -18,6 +18,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||
|
||||
const GenesisNetworkVersion = network.Version0
|
||||
|
||||
const NetworkBundle = "calibrationnet"
|
||||
const BootstrappersFile = "calibnet.pi"
|
||||
const GenesisFile = "calibnet.car"
|
||||
|
||||
|
@ -15,6 +15,7 @@ import (
|
||||
"github.com/ipfs/go-cid"
|
||||
)
|
||||
|
||||
const NetworkBundle = "caterpillarnet"
|
||||
const BootstrappersFile = "interopnet.pi"
|
||||
const GenesisFile = "interopnet.car"
|
||||
|
||||
|
@ -19,6 +19,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
||||
UpgradeSmokeHeight: DrandMainnet,
|
||||
}
|
||||
|
||||
const NetworkBundle = "mainnet"
|
||||
const GenesisNetworkVersion = network.Version0
|
||||
|
||||
const BootstrappersFile = "mainnet.pi"
|
||||
|
@ -107,6 +107,7 @@ var (
|
||||
}
|
||||
|
||||
GenesisNetworkVersion = network.Version0
|
||||
NetworkBundle = "devnet"
|
||||
|
||||
NewestNetworkVersion = 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
|
||||
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")
|
||||
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
|
||||
// So we pass it through ldflags instead
|
||||
netw := build.GetNetworkBundle()
|
||||
netw := build.NetworkBundle
|
||||
|
||||
for av, bd := range build.BuiltinActorReleases {
|
||||
// first check to see if we know this release
|
||||
|
Loading…
Reference in New Issue
Block a user