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

Use evm precompiles to replace ibc hooks/evm hooks #483

Open
yihuang opened this issue May 18, 2022 · 1 comment
Open

Use evm precompiles to replace ibc hooks/evm hooks #483

yihuang opened this issue May 18, 2022 · 1 comment

Comments

@yihuang
Copy link
Collaborator

yihuang commented May 18, 2022

https://github.com/loredanacirstea/ethermint/blob/precompiles-ibc7/x/evm/vm/precompiles.go#L39

Advantages

  • Directly called by contract, can return execution result to caller, more convenient.

Pitfalls

  • when precompiled contracts executed, the evm state modifications are not persisted in native storage yet, so they are not visible to the native code, need to be careful when handling user balances.
  • contract exception revert don't work with native storage changes?
@yihuang yihuang changed the title Use ibc precompiled to replace ibc hooks Use ibc precompiles to replace ibc hooks May 18, 2022
@yihuang yihuang changed the title Use ibc precompiles to replace ibc hooks Use ibc precompiles to replace ibc hooks/evm hooks May 18, 2022
@yihuang yihuang changed the title Use ibc precompiles to replace ibc hooks/evm hooks Use evm precompiles to replace ibc hooks/evm hooks May 18, 2022
@yihuang
Copy link
Collaborator Author

yihuang commented May 18, 2022

I guess there's one way to make it work, it's to manage the state inside statedb, or find a way to make statedb extensible.

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

No branches or pull requests

1 participant