API Breaking
- #25470 Refactor store interfaces to support generic value types (object stores):
- Replace
BasicKVStore,KVStore, andIteratorinterfaces/types with genericGBasicKVStore[V],GKVStore[V], andGIterator[V]. The old names are retained as type aliases (e.g.KVStore = GKVStore[[]byte]). - Remove
Iteratoras a direct alias todbm.Iterator. It is nowGIterator[[]byte], a distinct interface defined in the store package. Code that type-asserts todbm.Iteratorwill break. - Remove
CacheWrap()andCacheWrapWithTrace()method declarations from theCacheWrapinterface.CacheWrapnow embedsCacheWrapperto obtainCacheWrap(). - Add
GetObjKVStore(StoreKey) ObjKVStoreto theMultiStoreinterface. - Add generic store variants across
cachekv,gaskv,prefix,transient, andmempackages (GStore[V],NewGStore,NewObjStore).
- Replace
- #26037 Remove
GetCommitStoreandGetCommitKVStorefrom theCommitMultiStoreinterface. Remove top-levelstore.CommitStoreandstore.CommitKVStoretype aliases fromstore/reexport.go. - #26060 Remove non-functional
StoreMetrics. This metric interface never worked, so this simply removes dead code. - #26061 Remove tracing from store interfaces and implementations:
- Remove
SetTracer,SetTracingContext, andTracingEnabledfromMultiStoreinterface. - Remove
CacheWrapWithTracefromCacheWrapperinterface. - Remove
traceWriterandtraceContextparameters fromcachemulti.NewStore,cachemulti.NewFromKVStore, andcachemulti.NewFromParent. - Remove
store/tracekvpackage entirely. - Remove
TraceContexttypestore/types.
- Remove
Features
- #25470 Add object KV stores and refactor the base store to be generic across the value parameter:
- Add object store types:
ObjKVStore,ObjBasicKVStore,ObjIterator,ObjectStoreKey,StoreTypeObject. - Add generic store types:
GBasicKVStore[V],GKVStore[V],GIterator[V]. - Add
cachemulti.NewFromParentconstructor for lazy cache multistore construction from a parent store function.
- Add object store types:
- #25647 Add
EarliestVersion() int64to theCommitMultiStoreinterface andGetEarliestVersion(db)helper.
Bug Fixes
- #20425 Fix nil pointer panic when querying historical state where a new store does not exist.
- #24583 Fix pruning height calculation to correctly handle in-flight snapshots. Adds
SnapshotAnnouncerinterface andAnnounceSnapshotHeightto track snapshots in progress and prevent premature pruning of their heights.