Giter Club home page Giter Club logo

Comments (6)

agouin avatar agouin commented on July 17, 2024 2

Hey! While exploring the PFM, also noticed that the ModuleName has a typo packetfowardmiddleware -> packetforwardmiddleware, would be nice to be renamed if it's an easy fix

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.

https://github.com/strangelove-ventures/packet-forward-middleware/commits/f520372571b26f23e7ce4ba9925efbd1366fb0b6/router/types/keys.go

from ibc-apps.

Lockwarr avatar Lockwarr commented on July 17, 2024

Hey! While exploring the PFM, also noticed that the ModuleName has a typo packetfowardmiddleware -> packetforwardmiddleware, would be nice to be renamed if it's an easy fix

from ibc-apps.

nicolaslara avatar nicolaslara commented on July 17, 2024

yeah, I noticed that too, but thought I'd ignore it to avoid having to migrate the params to the new key.

from ibc-apps.

jtieri avatar jtieri commented on July 17, 2024

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

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 sdk.Dec type properly see

Is there something i'm overlooking here?

from ibc-apps.

nicolaslara avatar nicolaslara commented on July 17, 2024

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 ""

from ibc-apps.

jtieri avatar jtieri commented on July 17, 2024

Thanks that bit of context actually helped me find what I think the issue could be then.

In module.go we are not calling ValidateGenesis in the InitGenesis call. I'll get a PR opened right now

from ibc-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.