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

Revisit fee for wasm msg size #553

Closed
alpe opened this issue Jul 5, 2021 · 3 comments · Fixed by #567
Closed

Revisit fee for wasm msg size #553

alpe opened this issue Jul 5, 2021 · 3 comments · Fixed by #567
Milestone

Comments

@alpe
Copy link
Contributor

alpe commented Jul 5, 2021

With the new deserialization fee in wasmvm we charge twice

@alpe alpe added this to the v0.18.0 milestone Jul 5, 2021
@alpe alpe mentioned this issue Jul 5, 2021
10 tasks
@webmaster128
Copy link
Member

webmaster128 commented Jul 5, 2021

Could you elaborate what we charge twice and where?

wasmvm charges for the work done in wasmvm (the deserialization from the contract's binary response into Go structures). wasmd should charge for any work performed after that.

@alpe
Copy link
Contributor Author

alpe commented Jul 6, 2021

In the gas register we multiply the incoming message size by a factor see https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/gas_register.go#L127 .

@webmaster128
Copy link
Member

But this is the input into the contract, not the output. So it does not duplicate the new deserialization fee in wasmvm.

However, the deserialization of input messages is executed in Wasm and metered there. So if there is no significant work in wasmd at this point, we can reconsider the linked fee.

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 a pull request may close this issue.

2 participants