-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement object stores #206
feat: implement object stores #206
Conversation
func (cms Store) GetKVStore(key types.StoreKey) types.KVStore { | ||
store, ok := cms.getCacheWrap(key).(types.KVStore) | ||
if !ok { | ||
panic(fmt.Sprintf("store with key %v is not KVStore", key)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
store := types.KVStore(s) | ||
store, ok := s.(types.KVStore) | ||
if !ok { | ||
panic(fmt.Sprintf("store with key %v is not KVStore", key)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need use storetypes.GKVStore[V]
in runtime right?
dependers to be changed in other PR. |
9348ebf
to
7fc4763
Compare
…in store (cosmos#19770)" This reverts commit ff30f6e.
Solution: - revert the iavl bump, v1.0.2 is the version referenced by outer packages
generic interface generic btree generic cachekv generic transient store support ObjStore changelog Update CHANGELOG.md Signed-off-by: yihuang <huang@crypto.com> object store key Apply review suggestions fix merge conflict fix snapshot revert dependers value validation seems still need to replace store object store in api gas accounting for object store
Signed-off-by: yihuang <huang@crypto.com>
Signed-off-by: yihuang <huang@crypto.com>
// AssertValidValueLength checks if the value length is within length limit | ||
func AssertValidValueLength(l int) { | ||
if l > MaxValueLength { | ||
panic(errors.New("value is too large")) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
90f3048
into
crypto-org-chain:release/v0.50.x
Description
Module parameters are loaded multiple times for each tx, although the raw bytes are cached, the decoding process is not.
Support an object store that is transient stores for
interface{}
, applications can cache objects directly, without doing unnecessary encoding/decoding.Caching module parameters is an important use case for this, there are also many use cases out there.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change