Skip to content

Commit

Permalink
Merge branch 'master' into milad/modify-test-group-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
miladz68 authored Jul 28, 2023
2 parents 9646b10 + 3e87c85 commit 384a1f5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/coreum/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions build/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 3 additions & 1 deletion infra/apps/cored/cored.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion pkg/znet/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 384a1f5

Please sign in to comment.