When running x/staking simulations, it is assumed that all delegators are EOA accounts with a private key. Staking module allows cosmwasm contracts and other modules as delegators so running the simulation when another module is the delegator will fail with
delegation addr: cosmos1srd5yxrg346qd7mne893gy3g43elh2sw7lz0s3 does not exist in simulation accounts
Summary of Bug
When running
x/staking
simulations, it is assumed that all delegators are EOA accounts with a private key. Staking module allows cosmwasm contracts and other modules as delegators so running the simulation when another module is the delegator will fail withCurrent implementation https://github.com/cosmos/cosmos-sdk/blob/58f3a4a2375f0b617ee0ac3399085c1f996195ba/x/staking/simulation/operations.go#L551-L553
Suggestion to prevent the simulation from panic-ing here.
I can create a PR if core contributors think this should be updated. Thanks!
Version
Steps to Reproduce
We're running a custom module that stakes with a module account. Easiest way to reproduce would be to
go test -v -run=TestFullAppSimulation ./app -NumBlocks 200 -BlockSize 50 -Commit -Enabled -Seed 40