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

[Bug]: simulations operations are being created using params that can change when the tx is executed #18317

Closed
1 task done
facundomedica opened this issue Oct 31, 2023 · 3 comments

Comments

@facundomedica
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

In some operations we use params to calculate a value that will go into a transaction. The param used can, and probably will, change when the tx is executed causing unexpected errors.

Example: https://github.com/cosmos/cosmos-sdk/blob/main/x/gov/simulation/operations.go#L575

Proposed solutions:

  1. Make params change effective on H+1/H+2 in simulations
  2. Pre-calculate params and make them available to the operation creation functions.

Cosmos SDK Version

main

How to reproduce?

No response

@facundomedica
Copy link
Member Author

Labeling it as a bug because it seems like we are using it assuming that those are the params the state machine will have when a tx is executed

@alexanderbez
Copy link
Contributor

I like the proposal of delaying the updates to a block or 2.

@facundomedica
Copy link
Member Author

Closing as after some more debugging I realize the issue was something completely different, I was seeing different values but not because of params changing 😅 Fix: #18336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants