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

Fix pubkeys and account types in AnteHandlers #53

Merged
merged 5 commits into from
Mar 6, 2024

Conversation

ChristianBorst
Copy link
Collaborator

No description provided.

@ChristianBorst ChristianBorst requested a review from jkilpatr March 4, 2024 21:33
@ChristianBorst ChristianBorst force-pushed the christianborst/ante-accounts branch from b65921e to 7cc0e00 Compare March 4, 2024 21:33
Copy link
Collaborator

@jkilpatr jkilpatr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This covers a lot of ground. Is there any way we can unit test stuff like sig verification or sequence increment? the basics to ensure no one accidentally leaves anything related to the ante-handler setup improperly in the future.

Also looks like a go test failure

@ChristianBorst ChristianBorst force-pushed the christianborst/ante-accounts branch from 47207db to f4b260d Compare March 5, 2024 14:48
These decorators migrate incorrectly assigned Ethermint keys to
EthAccounts and set the pubkey on EVM Tx execution
This change requires an update to althea-net/ethermint so that the EVM
only creates the correct kind of accounts. When we set BaseAccount as
the default account type, it broke contract deployment because the
EthAccount is what makes code (especially the code hash) deployable at
an address.

Because ethermint was updated it was necessary to update the canto fork
as well.

The new paradigm initializes the evmKeeper with a special prototypical
account creation function to create a new EthAccount with an address
set. This function is used in the evm module and also throughout the
ante handlers everywhere a new account is created to ensure Ethermint
keys and contract accounts are all initialized correctly.

To ensure these changes work, ante handler tests have been copied and
enhanced from the ethermint project. I copied the general ante handler
tests but also added ones for the new EthSetPubkey and SetAccountType
decorators. The old antehandler is also checked to ensure the changes
fix the issue.
@ChristianBorst ChristianBorst force-pushed the christianborst/ante-accounts branch from f4b260d to 9b7b436 Compare March 6, 2024 03:01
@ChristianBorst ChristianBorst merged commit 781d76f into main Mar 6, 2024
18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants