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

simulation: use module accounts #8818

Closed
4 tasks
alexanderbez opened this issue Mar 8, 2021 · 8 comments · Fixed by #9075
Closed
4 tasks

simulation: use module accounts #8818

alexanderbez opened this issue Mar 8, 2021 · 8 comments · Fixed by #9075
Assignees
Milestone

Comments

@alexanderbez
Copy link
Contributor

Currently, simulation discards module accounts from the global set of accounts which are used for simulation operations (i.e. txs/msgs). However, this is not ideal because it removes a certain area of simulation/test coverage.

Namely, at the very least, we should be using module accounts as a recipient of MsgSend and MsgMultiSend operations so we can cover these cases, i.e. these operations should fail.

If it can be attempted on the hub or any live network, it should be able to be attempted in simulations.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@robert-zaremba
Copy link
Collaborator

Clarifying the scope of this task:

  • Unlock the possibility to use module accounts in messages in simulation tests. Currently this is not allowed.
  • identify and fix tests which could on the limitation above.
  • add a simulation test which uses a module account for MsgSend

@aaronc
Copy link
Member

aaronc commented Mar 11, 2021

@alexanderbez is what @robert-zaremba outlined accurate?

@robert-zaremba
Copy link
Collaborator

@aaronc - I discussed about this with @alexanderbez in a chat (the post above is almost a copy-past of a summary).

@cyberbono3
Copy link
Contributor

I can start working on it

@cyberbono3
Copy link
Contributor

cyberbono3 commented Apr 7, 2021

  1. Is this issue applicable to bank module only?
  2. To make sure I understand the scope of this issue. My task is to implement 2 tests similar to TestSimulateMsgSend and TestSimulateMsgMultiSend. Instead of using these accounts i have to use random accounts accounts := simtypes.RandomAccounts(r, 3) so both tests have to fail. Does it sound right?

@anilcse
Copy link
Collaborator

anilcse commented Apr 7, 2021

  1. Is this issue applicable to bank module only?
  2. To make sure I understand the scope of this issue. My task is to implement 2 tests similar to TestSimulateMsgSend and TestSimulateMsgMultiSend. Instead of using these accounts i have to use random accounts accounts := simtypes.RandomAccounts(r, 3) so both tests have to fail. Does it sound right?

you have to use module accounts, not randomAccounts and yes, the tests should fail when using module accounts

@robert-zaremba
Copy link
Collaborator

I can start working on it

Thanks Andrei

@robert-zaremba
Copy link
Collaborator

PS: you should just add 1-2 tests which will use a module account.

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.

9 participants