-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Low inflation rate creates invalid module account - potential chain halt #5569
Comments
Excellent investigation! Thanks, @rhuairahrighairidh. @fedekunze, I don't understand why this is the flow of execution in the context of the minting module account not existing in genesis (or any module account for that matter). It seems much more intuitive and sound to have the module accounts created (if they don't exist) during |
Alternatively, I've noticed @rhuairahrighairidh would you like to take a stab at this simple approach? |
Looks like |
@rhuairahrighairidh calling /cc @fedekunze |
Correct me if I'm missing something, but |
Correct, so not only are current constructors broken in their intent of using So I would recommend we:
Changes should be pretty trivial to implement. |
I agree with point 2, that would align Also what do you think about skipping sending 0 coins in the mint begin blocker? Even with an account set up it will emit a send event for 0 which seems a bit odd. |
I agree that we should avoid a zero balance send, but I don't see why (1) won't fix the overall issue? |
Summary of Bug
mint
module account is created.Details:
mint
's module account doesn't exist. Normaly it's created as needed whenmint
's beginblocker runs.mint
's begin blocker callssupply.Mint
which creates a mod account if one doesn't exist.mint
's module accountsupply
ever accesses this account it panics in the type assertion trying to convert it to module account. (cosmos-sdk/x/supply/internal/keeper/account.go
Line 37 in 1b6897a
Version
current
Steps to Reproduce
gaiacli q account cosmos1m3h30wlvsf8llruxtpukdvsy0km2kum8g38c8q
should return themint
module account, however it is not a module accountFor Admin Use
The text was updated successfully, but these errors were encountered: