Closed
Description
openedon Aug 14, 2018
cosmos-sdk/store/gaskvstore.go
Line 139 in 63713c9
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment