From 1e9b78094c04c83dccde54b09341e22b03201c56 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Mon, 20 Nov 2023 15:27:16 -0800 Subject: [PATCH 1/3] fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776) * fix(rocksdb): correctly resolve rocksdb path (#1767) ensure we use KAVA_HOME/data/application.db and not a nested application.db within that path * update changelog --------- Co-authored-by: Nick DeLuca (cherry picked from commit aca738fbc656ae29137c06999eea628c020f7c2f) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 44 +++++++++++++++++++++++++++++++ cmd/kava/opendb/opendb_rocksdb.go | 5 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97ae653bad..a9c9c0e249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,35 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +<<<<<<< HEAD +======= +### Features + +- (community) [#1704] Add module params +- (community) [#1706] Add disable inflation upgrade +- (community) [#1745] Enable params update via governance with `MsgUpdateParams` + +### Bug Fixes + +- (evmutil) [#1655] Initialize x/evmutil module account in InitGenesis +- (deps) [#1770] Bump ledger-cosmos-go to v0.13.1 to resolve signing error with + cosmos ledger app 2.34.12 +- (rockdb) [#1776] Fix resolution of rocksdb database path + +## State Machine Breaking + +- (community) [#1704] Add param to control when inflation will be disabled +- (community) [#1707] Default staking rewards per second set to `744191` +- (community) [#1706] Add disable inflation upgrade to begin blocker that updates x/mint and x/kavadist params +- (community) [#1729] Consolidate community funds from `x/distribution` and `x/kavadist` to `x/community` +- (community) [#1752] Set `x/distribution` CommunityTax to zero on inflation disable upgrade +- (community) [#1755] Keep funds in `x/community` in `CommunityPoolLendWithdrawProposal` handler +- (staking) [#1761] Set validator minimum commission to 5% for all validators under 5% + +## [v0.24.1](https://github.com/Kava-Labs/kava/releases/tag/v0.24.1) + +### Features +>>>>>>> aca738fb (fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776)) - (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry. - (metrics) [#1669] Add performance timing metrics to all Begin/EndBlockers @@ -210,6 +239,21 @@ Bump tendermint version to 0.32.10 to address [cosmos security advisory Lavender [\#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run large-scale simulations remotely using aws-batch +<<<<<<< HEAD +======= +[#1776]: https://github.com/Kava-Labs/kava/pull/1776 +[#1770]: https://github.com/Kava-Labs/kava/pull/1770 +[#1755]: https://github.com/Kava-Labs/kava/pull/1755 +[#1761]: https://github.com/Kava-Labs/kava/pull/1761 +[#1752]: https://github.com/Kava-Labs/kava/pull/1752 +[#1751]: https://github.com/Kava-Labs/kava/pull/1751 +[#1745]: https://github.com/Kava-Labs/kava/pull/1745 +[#1729]: https://github.com/Kava-Labs/kava/pull/1729 +[#1707]: https://github.com/Kava-Labs/kava/pull/1707 +[#1706]: https://github.com/Kava-Labs/kava/pull/1706 +[#1704]: https://github.com/Kava-Labs/kava/pull/1704 +[#1668]: https://github.com/Kava-Labs/kava/pull/1668 +>>>>>>> aca738fb (fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776)) [#1669]: https://github.com/Kava-Labs/kava/pull/1669 [#1668]: https://github.com/Kava-Labs/kava/pull/1668 [#1503]: https://github.com/Kava-Labs/kava/pull/1503 diff --git a/cmd/kava/opendb/opendb_rocksdb.go b/cmd/kava/opendb/opendb_rocksdb.go index 6bd3563602..c445933ea3 100644 --- a/cmd/kava/opendb/opendb_rocksdb.go +++ b/cmd/kava/opendb/opendb_rocksdb.go @@ -81,7 +81,7 @@ const ( func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) { dataDir := filepath.Join(home, "data") if backendType == dbm.RocksDBBackend { - return openRocksdb(filepath.Join(dataDir, "application.db"), appOpts) + return openRocksdb(dataDir, appOpts) } return dbm.NewDB("application", backendType, dataDir) @@ -90,7 +90,8 @@ func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) // openRocksdb loads existing options, overrides some of them with appOpts and opens database // option will be overridden only in case if it explicitly specified in appOpts func openRocksdb(dir string, appOpts types.AppOptions) (dbm.DB, error) { - dbOpts, cfOpts, err := loadLatestOptions(dir) + optionsPath := filepath.Join(dir, "application.db") + dbOpts, cfOpts, err := loadLatestOptions(optionsPath) if err != nil { return nil, err } From e703d923cf6840438130ba97f00c0a8d3973a7bb Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Mon, 20 Nov 2023 15:41:25 -0800 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c9c0e249..f9a4eb04cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,37 +36,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -<<<<<<< HEAD -======= -### Features - -- (community) [#1704] Add module params -- (community) [#1706] Add disable inflation upgrade -- (community) [#1745] Enable params update via governance with `MsgUpdateParams` - -### Bug Fixes - -- (evmutil) [#1655] Initialize x/evmutil module account in InitGenesis -- (deps) [#1770] Bump ledger-cosmos-go to v0.13.1 to resolve signing error with - cosmos ledger app 2.34.12 -- (rockdb) [#1776] Fix resolution of rocksdb database path - -## State Machine Breaking - -- (community) [#1704] Add param to control when inflation will be disabled -- (community) [#1707] Default staking rewards per second set to `744191` -- (community) [#1706] Add disable inflation upgrade to begin blocker that updates x/mint and x/kavadist params -- (community) [#1729] Consolidate community funds from `x/distribution` and `x/kavadist` to `x/community` -- (community) [#1752] Set `x/distribution` CommunityTax to zero on inflation disable upgrade -- (community) [#1755] Keep funds in `x/community` in `CommunityPoolLendWithdrawProposal` handler -- (staking) [#1761] Set validator minimum commission to 5% for all validators under 5% - -## [v0.24.1](https://github.com/Kava-Labs/kava/releases/tag/v0.24.1) - -### Features ->>>>>>> aca738fb (fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776)) - (metrics) [#1668] Adds non-state breaking x/metrics module for custom telemetry. - (metrics) [#1669] Add performance timing metrics to all Begin/EndBlockers +- (rocksdb) [#1767] Fix resolution of rocksdb database path ## [v0.21.1](https://github.com/Kava-Labs/kava/releases/tag/v0.21.1) @@ -239,21 +211,7 @@ Bump tendermint version to 0.32.10 to address [cosmos security advisory Lavender [\#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run large-scale simulations remotely using aws-batch -<<<<<<< HEAD -======= -[#1776]: https://github.com/Kava-Labs/kava/pull/1776 -[#1770]: https://github.com/Kava-Labs/kava/pull/1770 -[#1755]: https://github.com/Kava-Labs/kava/pull/1755 -[#1761]: https://github.com/Kava-Labs/kava/pull/1761 -[#1752]: https://github.com/Kava-Labs/kava/pull/1752 -[#1751]: https://github.com/Kava-Labs/kava/pull/1751 -[#1745]: https://github.com/Kava-Labs/kava/pull/1745 -[#1729]: https://github.com/Kava-Labs/kava/pull/1729 -[#1707]: https://github.com/Kava-Labs/kava/pull/1707 -[#1706]: https://github.com/Kava-Labs/kava/pull/1706 -[#1704]: https://github.com/Kava-Labs/kava/pull/1704 -[#1668]: https://github.com/Kava-Labs/kava/pull/1668 ->>>>>>> aca738fb (fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776)) +[#1767]: https://github.com/Kava-Labs/kava/pull/1767 [#1669]: https://github.com/Kava-Labs/kava/pull/1669 [#1668]: https://github.com/Kava-Labs/kava/pull/1668 [#1503]: https://github.com/Kava-Labs/kava/pull/1503 From df074c3ef0a7970ab50ac989096029124e8df868 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Mon, 20 Nov 2023 17:03:45 -0800 Subject: [PATCH 3/3] update golangci-lint job --- .github/workflows/ci-lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 378deadc0c..7c36c83587 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -8,9 +8,10 @@ jobs: golangci-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: golangci-lint uses: reviewdog/action-golangci-lint@v2 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review + golangci_lint_flags: --timeout 10m