Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare v1.4 #120

Merged
merged 3 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The KYVE Network

###### v1.3.0
###### v1.3.1

The KYVE consensus layer is the backbone of the KYVE ecosystem. This layer is a
sovereign Delegated Proof of Stake network built using the
Expand Down
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ pull_request_rules:
backport:
branches:
- release/v1.3.x
- name: backport patches to v1.4.x branch
conditions:
- base=main
- label=backport/v1.4.x
actions:
backport:
branches:
- release/v1.4.x
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

An '!' indicates a state machine breaking change.

## [v1.3.1](https://github.com/KYVENetwork/chain/releases/tag/v1.3.1) - 2023-08-02

### Bug Fixes

- [#122](https://github.com/KYVENetwork/chain/pull/122) Fix makefile go version parse cmd.

## [v1.3.0](https://github.com/KYVENetwork/chain/releases/tag/v1.3.0) - 2023-07-15

### Features
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COMMIT := $(shell git log -1 --format='%H')
GO_VERSION := $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1,2)
VERSION := v1.3.0 # $(shell echo $(shell git describe --tags) | sed 's/^v//')
VERSION := v1.3.1 # $(shell echo $(shell git describe --tags) | sed 's/^v//')

TEAM_ALLOCATION := 165000000000000
ifeq ($(ENV),kaon)
Expand Down
15 changes: 5 additions & 10 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"path/filepath"

v1p3 "github.com/KYVENetwork/chain/app/upgrades/v1_3"
v1p4 "github.com/KYVENetwork/chain/app/upgrades/v1_4"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -802,15 +802,10 @@ func NewKYVEApp(
app.SetEndBlocker(app.EndBlocker)

app.UpgradeKeeper.SetUpgradeHandler(
v1p3.UpgradeName,
v1p3.CreateUpgradeHandler(
v1p4.UpgradeName,
v1p4.CreateUpgradeHandler(
app.mm,
app.configurator,
app.PoolKeeper,
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.BundlesKeeper,
),
)

Expand All @@ -819,8 +814,8 @@ func NewKYVEApp(
panic(err)
}

if upgradeInfo.Name == v1p3.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
app.SetStoreLoader(v1p3.CreateStoreLoader(upgradeInfo.Height))
if upgradeInfo.Name == v1p4.UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
app.SetStoreLoader(v1p4.CreateStoreLoader(upgradeInfo.Height))
}

if loadLatest {
Expand Down
49 changes: 0 additions & 49 deletions app/upgrades/v1_3/constants.go

This file was deleted.

134 changes: 0 additions & 134 deletions app/upgrades/v1_3/upgrade.go

This file was deleted.

10 changes: 10 additions & 0 deletions app/upgrades/v1_4/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package v1_4

// UpgradeName is the name of this specific software upgrade used on-chain.
const UpgradeName = "v1.4.0"

// TestnetChainID is the Chain ID of the KYVE testnet (Kaon).
const TestnetChainID = "kaon-1"

// MainnetChainID is the Chain ID of the KYVE mainnet.
const MainnetChainID = "kyve-1"
8 changes: 2 additions & 6 deletions app/upgrades/v1_3/store.go → app/upgrades/v1_4/store.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
package v1_3
package v1_4

import (
"github.com/cosmos/cosmos-sdk/baseapp"
storeTypes "github.com/cosmos/cosmos-sdk/store/types"

// PFM
pfmTypes "github.com/strangelove-ventures/packet-forward-middleware/v6/router/types"
// Upgrade
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader {
storeUpgrades := storeTypes.StoreUpgrades{
Added: []string{
pfmTypes.StoreKey,
},
Added: []string{},
}

return upgradeTypes.UpgradeStoreLoader(upgradeHeight, &storeUpgrades)
Expand Down
21 changes: 21 additions & 0 deletions app/upgrades/v1_4/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package v1_4

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

// Upgrade
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradeTypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradeTypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", UpgradeName)
logger.Info("Run v1.4 upgrade")

return mm.RunMigrations(ctx, configurator, vm)
}
}