-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Summary of Bug
adr-038 state listener get feed with uncommitted writes.
adr-038 state listener is expect to only listens to the writes that get committed into chain state at the end of block, but it currently listens to kv store interface, which could includes writes that are not committed eventually, for example write calls happens in a grpc query.
We should only listen to the state writes on the consensus state machine.
Version
all the versions that support adr-038 state listening
Steps to Reproduce
- Setup state listener
- Simulate a cache write in grpc query like this:
cacheCtx, write := ctx.CacheContext()
store := cacheCtx.KVStore(k.storeKey)
store.Set([]byte("debug set"), []byte("value"))
write()
- Observe that the writes happen in grpc query are observed by state listener, although the writes will be discarded eventually.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels