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

Error handling of WithdrawValidatorCommission in export.go #728

Open
jaybxyz opened this issue Apr 19, 2022 · 1 comment
Open

Error handling of WithdrawValidatorCommission in export.go #728

jaybxyz opened this issue Apr 19, 2022 · 1 comment

Comments

@jaybxyz
Copy link

jaybxyz commented Apr 19, 2022

Summary

While I was implementing TestAppSimulationAfterImport simulation test for the fundraising module, I encountered this panic panic: no validator commission to withdraw. This is due to the error handling in WithdrawValidatorCommission function in app/export.go. I think it is worth of sharing with the SPN team to minimize debugging time if there is a plan to implement the simulation test.

To share a little more in detail, the simulation of Cosmos SDK staking module allows to set a validator's commission rate as zero. See this lines of code for reference. This may be the reason why error handling is ignored in CanWithdrawInvariant and here.

@lumtis
Copy link
Contributor

lumtis commented Apr 21, 2022

Thanks for the report, I think we haven't implemented this type of simulation test so far

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

No branches or pull requests

2 participants