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

Is MaxGas Still Limited by Rust? #528

Closed
loloicci opened this issue Jun 4, 2021 · 2 comments · Fixed by #529
Closed

Is MaxGas Still Limited by Rust? #528

loloicci opened this issue Jun 4, 2021 · 2 comments · Fixed by #529
Assignees
Labels
question Further information is requested
Milestone

Comments

@loloicci
Copy link
Contributor

loloicci commented Jun 4, 2021

There is a comment about GasLimit

// MaxGas for a contract is 10 billion wasmer gas (enforced in rust to prevent overflow)
// The limit for v0.9.3 is defined here: https://github.com/CosmWasm/cosmwasm/blob/v0.9.3/packages/vm/src/backends/singlepass.rs#L15-L23
// (this will be increased in future releases)

But in the present version, I cannot find this parameter in cosmwasm/vm.
Is it still limited by rust?

@ethanfrey
Copy link
Member

@webmaster128 would know better.

This may have been fixed with wasmer 1.0. If so, I should remove the comment

@alpe alpe added the question Further information is requested label Jun 4, 2021
@webmaster128
Copy link
Member

Nice find, thank you! The value was increased from 10_000_000_000 to 0x7FFFFFFFFFFFFFFF in CosmWasm 0.10 and completely removed in CosmWasm 0.13. Now ever uint64 is a valid gas limit. The constant MaxGas should be removed completely.

@webmaster128 webmaster128 assigned alpe and unassigned webmaster128 Jun 4, 2021
@webmaster128 webmaster128 added this to the v0.18.0 milestone Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants