-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Research] Gas settings in mainnet #53
Comments
For some more context: I believe I was concerned about on mainnet you can't easily submit txs that take > 25M gas. How much gas do contract uploads / proposals take? If more than this, we need to start asking validators / nodes to increase this config param |
I think let's look at biggest code stored on terra / juno and try submitting that on our testnet, monitor gas consumption? That should give us good hints. The gas consumption calc logic is consistent across the chains (local/testnet/mainnet), am I correct? |
I can give some insight on this. On Terra, the The gas used was 7,437,249. At the standard Terra gas price of |
The osmosis gas cost is about 100x cheaper today then were Terra was at, so in terms of gas USD costs I don't think we need to be super worried. On Osmosis, the current max contract size is 800kB as far as I understand: https://github.com/CosmWasm/wasmd/blob/main/x/wasm/types/validation.go#L11-L12 Looks like for contract uploads we maybe don't need to be worried? (Frey mentioned at one point that theres is a notably gas overhead for the governance proposals over a normal upload. Can someone post once they try that) We run into 25M limits at the moment, which seems fine. There is no unused gas refund work going on, its blocked on subsequent SDK releases right now. Those gas counts do look excessive for exiting an apollo vault, we should look into we can tune down that gas amount. Or get those contracts in a cache, especially as in Osmosis we have bounded amounts of wasm code. Right now, 4M gas / contract call would lead to Osmosis blocks getting filled rather quickly. |
Ok great I'll report on the progress on #59 as we test the gas settings. |
Yeah as mentioned I think almost all of the gas is due to SmartQuery and returning CosmosMsgs from ExecuteMsg handlers. This can be optimized somewhat, but often leads to more complex code. Pinning/caching seems like the best option to me. |
No description provided.
The text was updated successfully, but these errors were encountered: