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

Catch panics on cosmos out of gas in estimateGas #39

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

philipsu522
Copy link

Cosmos sdk gas meter panics when out it hits out of gas. However, Ethereum's estimateGas will intentionally try to "find" the limit and at times run out of gas when simulating (see https://github.com/sei-protocol/go-ethereum/blob/master/eth/gasestimator/gasestimator.go#L131-L148). Therefore, we need to catch this panic and let estimateGas continue it's binary search

@philipsu522 philipsu522 merged commit 136f839 into master Dec 13, 2024
1 check failed
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