You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now if a tx out of gas panics during an ApplyFuncIfNoErr block, we log a spooky looking message, and don't correctly write the out of gas up, to ensure the tx gets fully reverted. In concrete instantiations today, due to superfluid, we are safe. But this should be addressed to make the API more generally safe, and to remove the ominous logs.
Find a reliable way to detect if a panic is an out of gas (we may need to edit SDK fork ante handler, or fork our own gas handler -- tbh SDK out of gas handling is pretty insane)
If out of gas, panic catch, then out of gas panic again. Write a test that this gets caught as a normal out of gas panic would get caught in a tx
The text was updated successfully, but these errors were encountered:
Yeah it happens in the SDK. In general the SDK's guarantees around gas are pretty scant, so its a huge pain to fix things like this. The decision is also fairly complex, because the SDK framework only has the opportunity at the end of a message exec to cleanly alter execution flow, without a panic to abort the flow. (This is unlike with a VM interpreter, where you can just halt at the next instruction. The base 'instruction' unit of the SDK is poorly documented, but is the sdk.Msg)
I don't want to derail this issue too much with the SDK's design to panic for gas control flow.
Background
Right now if a tx out of gas panics during an ApplyFuncIfNoErr block, we log a spooky looking message, and don't correctly write the out of gas up, to ensure the tx gets fully reverted. In concrete instantiations today, due to superfluid, we are safe. But this should be addressed to make the API more generally safe, and to remove the ominous logs.
Suggested Design
https://github.com/osmosis-labs/osmosis/blob/main/osmoutils/cache_ctx.go#L16-L34
The text was updated successfully, but these errors were encountered: