Skip to content

Commit

Permalink
fix(rocksdb): correctly resolve rocksdb path (#1767) (#1776)
Browse files Browse the repository at this point in the history
* 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 <nickdeluca08@gmail.com>
(cherry picked from commit aca738f)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
pirtleshell authored and mergify[bot] committed Nov 20, 2023
1 parent 4e7b331 commit 1f6961a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -199,6 +228,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
[#1384]: https://github.com/Kava-Labs/kava/pull/1384
5 changes: 3 additions & 2 deletions cmd/kava/opendb/opendb_rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down

0 comments on commit 1f6961a

Please sign in to comment.