crypto-org-chain / go-block-stm

block-stm implementation in golang that works with cosmos-sdk
Other
9 stars 5 forks source link

feat: high level storage primitives that are parallel friendly #18

Open yihuang opened 1 day ago

yihuang commented 1 day ago

Currently all storage operations are implemented with basic get/set operations, for example fee deduction is implemented as:

amount = store.Get(key)
amount -= fee
store.Set(key, amount)

But with higher level primitive in store interface, and refactor the application logic into sth like this:

store.Incr(key, -fee)

the block-stm might has some opportunity to optimize this higher level primitive more parallel friendly.

mmsqe commented 1 day ago

Do you mean like redis incr?

yihuang commented 1 day ago

Do you mean like redis incr?

I mean the store interface provided to the application logic, and special handling in block-atom layer.