-
Notifications
You must be signed in to change notification settings - Fork 68
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
PFM: FeePercentage param should default to zero if not set #46
Comments
Hey! While exploring the PFM, also noticed that the ModuleName has a typo |
yeah, I noticed that too, but thought I'd ignore it to avoid having to migrate the params to the new key. |
Yes, we realized this after the first release of the middleware unfortunately, so it was already adopted with the typo by some chains. To prevent migrations, we decided to live with the typo. |
I took a look at this and it seemed like we are using a default value of 0 and also doing some validation to ensure that the param value can be type coerced into the Is there something i'm overlooking here? |
That looks good to me to right now. I can't remember the details here, but I think it was happening for us on a testnet when the parameter was not set on genesis or set to "". IIRC the validation occurs when setting the param, but if it never was initialized, it would somehow get "" |
Thanks that bit of context actually helped me find what I think the issue could be then. In module.go we are not calling |
At the moment, if the param is not set (i.e.: set to
""
) txs with forwarding will fail since https://github.com/cosmos/ibc-apps/blob/main/middleware/packet-forward-middleware/router/keeper/keeper.go#L214 can't convert it to a Dec.Adding sensible defaults should be an easy fix
The text was updated successfully, but these errors were encountered: