-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Description
cosmos-sdk/store/gaskvstore.go
Line 139 in 63713c9
| g.gasMeter.ConsumeGas(g.gasConfig.KeyCostFlat, "KeyFlat") |
We should prob not be charging for each call of Key()/Value(), since they'd be cached once fetched anyways. I also don't think we need two separate key/value charges either.
I'd change our store gas system to charge a FlatRead upon iterator initialization, and a new FlatIterNext for calling Next, and no charge for Key or Value.
Maybe also a "UnsafeGetParent()" function that returns the parent so we can debug applications, and a TODO to add a conditional on Unsafe to only allow it when e.g. a "mode=develop" flag is set somewhere. I had to expose gasIterator to debug the 7003 crash... (see #1938)
Reactions are currently unavailable