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
Refactor BaseApps's RunTx so that PostHandler is run in the same way as the AnteHandler (even on failure).
Problem Definition
In order to fully support stateful precompiled contracts on Evmos (and other EVM chains using Etherming), we need to migrate the leftover gas refund logic to the PostHandler. However, the current structure of the BaseApp (more specifically, runTx) doesn't support running post handler logic when the transaction fails and is only run when runMsgs is successful.
Proposal
Refactor the PostHandlers so that RunTx is always run even on failure. This would make PostHandler stateful in the same way that the AnteHandler currently works.
The main change involved is moving the postHandler logic outside the if err == nil check as shown below
Summary
Refactor BaseApps's
RunTx
so thatPostHandler
is run in the same way as the AnteHandler (even on failure).Problem Definition
In order to fully support stateful precompiled contracts on Evmos (and other EVM chains using Etherming), we need to migrate the leftover gas refund logic to the
PostHandler
. However, the current structure of theBaseApp
(more specifically,runTx
) doesn't support running post handler logic when the transaction fails and is only run whenrunMsgs
is successful.Proposal
Refactor the PostHandlers so that RunTx is always run even on failure. This would make PostHandler stateful in the same way that the AnteHandler currently works.
The main change involved is moving the postHandler logic outside the
if err == nil
check as shown belowcosmos-sdk/baseapp/baseapp.go
Lines 735 to 761 in 385bff5
The text was updated successfully, but these errors were encountered: