cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.28k stars 3.64k forks source link

[Feature]: Storage abstraction #22619

Closed kimurayu45z closed 4 hours ago

kimurayu45z commented 3 days ago

Summary

As I read ADR-065, I understood that a lot of efforts are put for enhancing the performance of KVStore.

I want to propose to improve also the developers experience of operations in KVStore. Now Cosmos SDK requires developers to operate KVStore directly with global defined key prefix bytes. The developers experience is very bad.

How about creating storage abstraction package like cosmossdk.io/storage-abstraction?

cw-storage-plus is a very good example in CosmWasm which is very close to what I want to say. By using this package, developers can access storage without directly managing key prefix bytes. https://github.com/CosmWasm/cw-storage-plus

Problem Definition

No response

Proposed Feature

tac0turtle commented 3 days ago

this sounds like https://github.com/cosmos/cosmos-sdk/tree/main/collections. Have you looked at this?