diff --git a/CHANGELOG.md b/CHANGELOG.md index aae7b5f0e..a688f6396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [#965](https://github.com/cosmos/iavl/pull/965) Use expected interface for expected IAVL `Logger`. - [#970](https://github.com/cosmos/iavl/pull/970) Close the pruning process when the nodeDB is closed. - [#980](https://github.com/cosmos/iavl/pull/980) Use the `sdk/core/store.KVStoreWithBatch` interface instead of `iavl/db.DB` interface +- [#]() Cache first version for legacy versions, fix performance regression after upgrade. ## v1.2.0 May 13, 2024 diff --git a/nodedb.go b/nodedb.go index 096fafeac..f86993c06 100644 --- a/nodedb.go +++ b/nodedb.go @@ -738,6 +738,7 @@ func (ndb *nodeDB) getFirstVersion() (int64, error) { if itr.Valid() { var version int64 legacyRootKeyFormat.Scan(itr.Key(), &version) + ndb.resetFirstVersion(version) return version, nil } // Find the first version