Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Sep 4, 2023
2 parents 1fdcb61 + 619f9a1 commit db0ec50
Show file tree
Hide file tree
Showing 126 changed files with 9,725 additions and 2,523 deletions.
14 changes: 1 addition & 13 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# https://help.github.com/articles/about-codeowners

* @johnletey @mbreithecker

# CODEOWNERS for x/bundles

/x/bundles @johnletey @troykessler @mbreithecker

# CODEOWNERS for x/pool

/x/pool @johnletey @troykessler @mbreithecker

# CODEOWNERS for x/team

/x/team @johnletey @troykessler @mbreithecker
* @johnletey @mbreithecker @troykessler
4 changes: 2 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The KYVE Network

###### v1.2.1
###### v1.4.0

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 All @@ -18,7 +18,7 @@ You can find the `kyved` binary in the `./build` directory.
If you need binaries for alternative architectures than your host:

```shell
make release
make release ENV=mainnet
```

The different binaries can be found in the `./release` directory.
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
47 changes: 38 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,59 @@

# CHANGELOG

## [Unreleased]
An '!' indicates a state machine breaking change.

### Features
## [v1.4.0](https://github.com/KYVENetwork/chain/releases/tag/v1.4.0) - 2023-09-04

- [#33](https://github.com/KYVENetwork/chain/pull/33) Upgrade Cosmos SDK to [v0.47.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.3) ([`v0.47.3-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.47.3-kyve)).
- (ibc) [#30](https://github.com/KYVENetwork/chain/pull/30) Integrate [Packet Forward Middleware](https://github.com/strangelove-ventures/packet-forward-middleware).

## [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

- ! (ibc) [#30](https://github.com/KYVENetwork/chain/pull/30) Integrate [Packet Forward Middleware](https://github.com/strangelove-ventures/packet-forward-middleware).
- ! (`x/bundles`) [#98](https://github.com/KYVENetwork/chain/pull/98) Split inflation rewards between chain and protocol layer.
- ! (`x/bundles`) [#99](https://github.com/KYVENetwork/chain/pull/99) Use weighted round-robin approach for uploader selection.
- ! (`x/bundles`) [#108](https://github.com/KYVENetwork/chain/pull/108) Store stake security for finalized bundles.

### Improvements

- (`x/bundles`) [#62](https://github.com/KYVENetwork/chain/pull/62) Payout storage cost directly to the bundle uploader.
- (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Allow protocol validator commission rewards to be claimed.
- ! (`x/bundles`) [#62](https://github.com/KYVENetwork/chain/pull/62) Payout storage cost directly to the bundle uploader.
- ! (`x/pool`) [#74](https://github.com/KYVENetwork/chain/pull/74) Improve parameter validation in pool proposals.
- ! (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Allow protocol validator commission rewards to be claimed.

### Bug Fixes

- (deps) [#82](https://github.com/KYVENetwork/chain/pull/82) Bump Cosmos SDK to [v0.46.13](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.13) ([`v0.46.13-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.46.13-kyve)) to adhere to the [Cosmos SDK Barberry Security Advisory](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry).
- [#96](https://github.com/KYVENetwork/chain/pull/96) Track investor delegation inside auth module.

### Client Breaking

- (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Include `MsgClaimCommissionRewards` for claiming commission rewards.
- ! (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Include `MsgClaimCommissionRewards` for claiming commission rewards.

### API Breaking

<!-- TODO: Switch this link to the release tag. -->
- (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Emit an [event](https://github.com/KYVENetwork/chain/blob/main/x/stakers/spec/05_events.md#eventclaimcommissionrewards) when claiming protocol validator commission rewards.
- (`x/query`) [#87](https://github.com/KYVENetwork/chain/pull/87) Correctly return pools that an account has funded.
- (`x/stakers`) [#46](https://github.com/KYVENetwork/chain/pull/46) Emit an [event](https://github.com/KYVENetwork/chain/blob/v1.3.0/x/stakers/spec/05_events.md#eventclaimcommissionrewards) when claiming protocol validator commission rewards.
- (`x/bundles`) [#104](https://github.com/KYVENetwork/chain/pull/104) Improve schema for finalized bundles query.

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

### API Breaking

- (`x/query`) [#87](https://github.com/KYVENetwork/chain/pull/87) Correctly return pools that an account has funded.
- (`x/bundles`) [#104](https://github.com/KYVENetwork/chain/pull/104) Improve schema for finalized bundles query.

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

### Bug Fixes

- (deps) [#82](https://github.com/KYVENetwork/chain/pull/82) Bump Cosmos SDK to [v0.46.13](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.13) ([`v0.46.13-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.46.13-kyve)) to adhere to the [Cosmos SDK Barberry Security Advisory](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry).

## [v1.2.1](https://github.com/KYVENetwork/chain/releases/tag/v1.2.1) - 2023-05-25

Expand Down
4 changes: 2 additions & 2 deletions 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 -f2)
VERSION := v1.2.1 # $(shell echo $(shell git describe --tags) | sed 's/^v//')
GO_VERSION := $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1,2)
VERSION := v1.3.1 # $(shell echo $(shell git describe --tags) | sed 's/^v//')

TEAM_ALLOCATION := 165000000000000
ifeq ($(ENV),kaon)
Expand Down
17 changes: 17 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# KYVE Security Policy

## Supported Versions

| Version | Supported |
|---------|--------------------|
| main | :white_check_mark: |
| v1.2.x | :white_check_mark: |
| < v1.2 | :x: |

## Reporting a Vulnerability

Two main ways of reporting a vulnerability to the KYVE Core Team exist.

You can contact us at [email protected], which all code owners can access and check regularly. Tied to this email, you can find our [public key](https://keys.openpgp.org/[email protected]) that you can use to send us encrypted emails.

Additionally, you can go through GitHub's [private vulnerability reporting system](https://github.com/KYVENetwork/chain/security/advisories/new).
22 changes: 13 additions & 9 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"os"
"path/filepath"

v1p3 "github.com/KYVENetwork/chain/app/upgrades/v1_3"
v1p4 "github.com/KYVENetwork/chain/app/upgrades/v1_4"
dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/libs/log"
cmtOs "github.com/cometbft/cometbft/libs/os"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down Expand Up @@ -457,7 +458,7 @@ func NewKYVEApp(
// ... other modules keepers
app.GlobalKeeper = *globalKeeper.NewKeeper(appCodec, keys[globalTypes.StoreKey], authTypes.NewModuleAddress(govTypes.ModuleName).String())

app.TeamKeeper = *teamKeeper.NewKeeper(appCodec, keys[teamTypes.StoreKey], app.AccountKeeper, app.BankKeeper)
app.TeamKeeper = *teamKeeper.NewKeeper(appCodec, keys[teamTypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.MintKeeper, *app.UpgradeKeeper)

app.PoolKeeper = *poolKeeper.NewKeeper(
appCodec,
Expand All @@ -469,7 +470,9 @@ func NewKYVEApp(
app.AccountKeeper,
app.BankKeeper,
app.DistributionKeeper,
app.MintKeeper,
app.UpgradeKeeper,
app.TeamKeeper,
)

app.StakersKeeper = *stakersKeeper.NewKeeper(
Expand Down Expand Up @@ -699,10 +702,10 @@ func NewKYVEApp(
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),

// KYVE
bundles.NewAppModule(appCodec, app.BundlesKeeper, app.AccountKeeper, app.BankKeeper),
bundles.NewAppModule(appCodec, app.BundlesKeeper, app.AccountKeeper, app.BankKeeper, app.DistributionKeeper, app.MintKeeper, *app.UpgradeKeeper, app.PoolKeeper, app.TeamKeeper),
delegation.NewAppModule(appCodec, app.DelegationKeeper, app.AccountKeeper, app.BankKeeper),
global.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.GlobalKeeper, *app.UpgradeKeeper),
pool.NewAppModule(appCodec, app.PoolKeeper, app.AccountKeeper, app.BankKeeper),
pool.NewAppModule(appCodec, app.PoolKeeper, app.AccountKeeper, app.BankKeeper, *app.UpgradeKeeper),
query.NewAppModule(appCodec, app.QueryKeeper, app.AccountKeeper, app.BankKeeper),
stakers.NewAppModule(appCodec, app.StakersKeeper, app.AccountKeeper, app.BankKeeper),
team.NewAppModule(appCodec, app.BankKeeper, app.MintKeeper, app.TeamKeeper, *app.UpgradeKeeper),
Expand All @@ -719,6 +722,8 @@ func NewKYVEApp(
mintTypes.ModuleName,
// NOTE: x/team must be run before x/distribution and after x/mint.
teamTypes.ModuleName,
// NOTE: x/bundles must be run before x/distribution and after x/team.
bundlesTypes.ModuleName,
distributionTypes.ModuleName,
slashingTypes.ModuleName,
evidenceTypes.ModuleName,
Expand All @@ -743,7 +748,6 @@ func NewKYVEApp(
poolTypes.ModuleName,
stakersTypes.ModuleName,
delegationTypes.ModuleName,
bundlesTypes.ModuleName,
queryTypes.ModuleName,
globalTypes.ModuleName,
)
Expand Down Expand Up @@ -866,8 +870,8 @@ func NewKYVEApp(
app.SetEndBlocker(app.EndBlocker)

app.UpgradeKeeper.SetUpgradeHandler(
v1p3.UpgradeName,
v1p3.CreateUpgradeHandler(
v1p4.UpgradeName,
v1p4.CreateUpgradeHandler(
app.mm,
app.configurator,
appCodec,
Expand All @@ -884,8 +888,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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1_3
package v1_4

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

// TestnetChainID is the Chain ID of the KYVE testnet (Kaon).
const TestnetChainID = "kaon-1"
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v1_3/store.go → app/upgrades/v1_4/store.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1_3
package v1_4

import (
"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1_3
package v1_4

import (
"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down Expand Up @@ -34,6 +34,9 @@ func CreateUpgradeHandler(
paramsKeeper paramsKeeper.Keeper,
) 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")

var err error

// Migrate consensus parameters from x/params to dedicated x/consensus module.
Expand Down
18 changes: 10 additions & 8 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,32 @@ genesis:
clawback: "1804978800"
commencement: "1647212400"
pool:
pool_count: "2"
params:
protocol_inflation_share: "0.04"
pool_count: "1"
pool_list:
- config: "ar://tMTrJ8E3QgBNLz0-lyn6QrxasEIX46d14QFVmBWshSI"
- config: "{\"network\":\"kyve-1\",\"rpc\":\"https://rpc-eu-1.kyve.network\"}"
current_compression_id: "1"
current_index: "0"
current_key: ""
current_storage_provider_id: "1"
current_summary: ""
funders: []
id: "0"
logo: "ar://E3jXAOeJ3El7HQgOf_NtSOwVE7Sd0M4g4bYqjCBH9CU"
logo: ""
max_bundle_size: "100"
min_delegation: "100000000000"
name: "Avalanche // C-Chain"
name: "KYVE // Mainnet"
operating_cost: "2500000000"
disabled: false
runtime: '@kyvejs/evm'
start_key: "0"
runtime: '@kyvejs/tendermint-bsync'
start_key: "1"
total_bundles: "0"
total_funds: "0"
upload_interval: "60"
protocol:
version: "1.0.0-beta.5"
binaries: "{\"kyve-macos-x64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Fevm%401.0.0-beta.5/kyve-macos-x64.zip\"}"
version: "1.0.0"
binaries: "{\"kyve-linux-arm64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint-bsync%401.0.0/kyve-linux-arm64.zip\",\"kyve-linux-x64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint-bsync%401.0.0/kyve-linux-x64.zip\",\"kyve-macos-x64\":\"https://github.com/KYVENetwork/kyvejs/releases/download/%40kyvejs%2Ftendermint-bsync%401.0.0/kyve-macos-x64.zip\"}"
last_upgrade: "0"
upgrade_plan:
version: ""
Expand Down
Loading

0 comments on commit db0ec50

Please sign in to comment.