-
Notifications
You must be signed in to change notification settings - Fork 43
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
Simulation test: out of gas
error for some simulation
#369
Comments
I think this error is due to this value https://github.com/cosmos/cosmos-sdk/blob/master/simapp/helpers/test_helpers.go#L17 We can't override it being a constant, so the best option is to use a custom However, I've seen this error arise also for SDK internal modules (e.g. staking) where we can't really do much. Thoughts? |
For instance, doing
Which is coming from EDIT: I've noticed you also have seen this error coming from |
cosmos/cosmos-sdk#9463 |
@giunatale @lubtd That issue was created a while ago, so I had to trace it down for a bit. If I remember it correctly, it occurs due to the usage of denomination other than From our team's experience of implementing simulation tests for other modules, we decide to have custom Reference the following code lines:
I hope this helps you in resolving the |
Thanks for the information @kogisin ! @giunatale do you think you can tackle this task? |
Sounds good, it was in my plan to take it on |
Unfortunately using a custom This is because we are having this error come up from {"entry_kind":"msg","height":269,"order":111,"operation":{"route":"staking","name":"begin_unbonding","comment":"unable to deliver tx","ok":false,"msg":null}} It seems Will investigate more but this might require more time than expected. |
Let's continue investing on tomorrow, otherwise, we can put it aside for now. Most of the time we can perform the full non-determism simulation test without encountering the issue. I considered this task as a priority because it seemed originally that the error occurred everytime |
So after some further investigation, I've come to similar conclusions as per cosmos/cosmos-sdk#9463. And, unfortunately, although we can mitigate this issue we will not be able to fully solve it unless we patch the cosmos-sdk. The An example auto-claimed rewards for the account that created the
For this instance gas consumption was about Now, this problem can be mitigated if at least for our modules' simulations we just use the I will do a PR changing how we use fees for our modules, but I can't do anything for the cosmos-sdk internals. This problem is specific for chains where simulation ends up creating (and thus accumulating as fee-based rewards) a lot of different denoms, and addressing this directly in the comsos-sdk would mean either changing the logic of |
Sounds good👍
The issue is that it prevents us from doing large simulation |
I know, but our hands are tied. Only realistic option would be to used a forked cosmos-sdk. Unless we make all vouchers non-sendable in simulations, so they don't end up being used as fees. But I'm not even sure this would work |
Describe the bug
When setting values for
FlagNumBlocksValue
andFlagBlockSizeValue
flags, the simulation test can fail with the errorout of gas in location: WritePerByte; gasWanted: 1000000, gasUsed: 1000373: out of gas
While it particularly happen when setting high values, the error can sometimes occurs for random low values. Therefore, there might be a flaw in our configuration for simulation tests
To Reproduce
Set following values in
app/simulation_test.go
The text was updated successfully, but these errors were encountered: