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

R4R: Fix infinite gas meter utilization during aborted ante handler executions #1077

Merged
merged 1 commit into from
Jan 16, 2019
Merged

R4R: Fix infinite gas meter utilization during aborted ante handler executions #1077

merged 1 commit into from
Jan 16, 2019

Conversation

HaoyangLiu
Copy link

Merge: cosmos/cosmos-sdk#3244

This issue is not severe for us. Because we don't plan to enable block gas limit.

@haifengxi haifengxi added bug Something isn't working bank labels Jan 15, 2019
// prior to returning.
ctx = newCtx.WithMultiStore(ms)
}

if abort {
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will make the newCtx.GasMeter().ConsumeGas(auth.BlockStoreCostPerByte * sdk.Gas(len(txBytes)), "blockstore") do not work. Because the ConsumeGas works on newCtx, not the ctx = newCtx.WithMultiStore(ms).

Copy link
Author

Choose a reason for hiding this comment

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

msCache.Write() will write the gas comsumtion to real store.

@wukongcheng wukongcheng changed the title R4R: Update ante handler to set limit when running an invalid tx type R4R: Fix infinite gas meter utilization during aborted ante handler executions Jan 16, 2019
@wukongcheng wukongcheng merged commit ea2c937 into irisnet:develop Jan 16, 2019
@HaoyangLiu HaoyangLiu deleted the haoyang/fix-runtx-gas-issue branch March 6, 2019 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bank bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants