diff --git a/build/coreum/images.go b/build/coreum/images.go index 5c1fe145..3ff3e536 100644 --- a/build/coreum/images.go +++ b/build/coreum/images.go @@ -66,6 +66,7 @@ func buildCoredDockerImage(ctx context.Context, cfg imageConfig) error { func ensureReleasedBinaries(ctx context.Context, deps build.DepsFunc) error { for _, binaryTool := range []tools.Name{ tools.CoredV100, + tools.CoredV200, } { if err := tools.EnsureBinaries(ctx, binaryTool, tools.PlatformDockerLocal); err != nil { return err diff --git a/build/tools/tools.go b/build/tools/tools.go index 21028b8a..12097c0d 100644 --- a/build/tools/tools.go +++ b/build/tools/tools.go @@ -35,6 +35,7 @@ const ( RelayerCosmos Name = "relayercosmos" Hermes Name = "hermes" CoredV100 Name = "cored-v1.0.0" + CoredV200 Name = "cored-v2.0.0" Protoc Name = "protoc" ProtocGenDoc Name = "protoc-gen-doc" ) @@ -241,6 +242,25 @@ var tools = map[Name]Tool{ }, }, }, + CoredV200: { + Version: "v2.0.0", + Sources: Sources{ + PlatformDockerAMD64: { + URL: "https://github.com/CoreumFoundation/coreum/releases/download/v2.0.0/cored-linux-amd64", + Hash: "sha256:7848022a3a35723ecef02eb835fbf139989aace8d780186018dbcdebdc57d694", + Binaries: map[string]string{ + "bin/cored-v2.0.0": "cored-linux-amd64", + }, + }, + PlatformDockerARM64: { + URL: "https://github.com/CoreumFoundation/coreum/releases/download/v2.0.0/cored-linux-arm64", + Hash: "sha256:8b0df987c13ede90eb79f7c4bdae3d1a503c14aaa2b5f187a84f575bad66b39b", + Binaries: map[string]string{ + "bin/cored-v2.0.0": "cored-linux-arm64", + }, + }, + }, + }, // https://github.com/protocolbuffers/protobuf/releases Protoc: { diff --git a/infra/apps/cored/cored.go b/infra/apps/cored/cored.go index ac14dbaf..57a25158 100644 --- a/infra/apps/cored/cored.go +++ b/infra/apps/cored/cored.go @@ -359,7 +359,9 @@ func (c Cored) prepare() error { // upgrade to binary mapping upgrades := map[string]string{ - "v2": "cored", // TODO update to next version once the binary is ready + // To test upgrade plan v2 for mainnet and v2patch1 for testnet both plans must target the newest binary + "v2": "cored", + "v2patch1": "cored", // TODO update to next version once the binary is ready } for upgrade, binary := range upgrades { err := copyFile(filepath.Join(c.config.BinDir, ".cache", "cored", "docker."+runtime.GOARCH, "bin", binary), diff --git a/pkg/znet/commands.go b/pkg/znet/commands.go index a3948c2a..3a15351e 100644 --- a/pkg/znet/commands.go +++ b/pkg/znet/commands.go @@ -297,7 +297,7 @@ func shellConfig(envName string) (string, string, error) { func coredVersionToGenesisTemplate(coredVersion string) (string, error) { switch coredVersion { - case "": + case "", "v2.0.0": return coreumconfig.GenesisV2Template, nil case "v1.0.0": return coreumconfig.GenesisV1Template, nil