Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor runTx to include PostHandler cases #14592

Closed
Vvaradinov opened this issue Jan 12, 2023 · 1 comment
Closed

Refactor runTx to include PostHandler cases #14592

Vvaradinov opened this issue Jan 12, 2023 · 1 comment

Comments

@Vvaradinov
Copy link
Contributor

Summary

This is a follow up of #13942. To include the 3 cases for PostHandler in runTx.

Problem Definition

In order to fully support stateful precompiled contracts on Evmos (and other EVM chains using Ethermint), we need to migrate the leftover gas refund logic to the PostHandler. After the runMsg success bool was included - #13940 and additional change to runTx is required to cover the 3 cases for the PostHandler

  1. When the tx errors and the PostHandler is not set.
  2. When the tx errors and the PostHandler is set
  3. When the tx is successful and the PostHandler is set.

Proposal

  1. The PostHandler is not set and the tx errors so return the err
  2. The tx errors and the PostHandler is set so run the Posthandler with runMsgCtx so that the state from runMsgs is persisted.
  3. The tx is successful and the PostHandler is set so run the Posthandler with runMsgCtx so that the state from runMsgs is persisted.
@Vvaradinov
Copy link
Contributor Author

Closing this since we were able to solve this in another way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants