ComposableFi / composable-cosmos

The home of IBC
29 stars 95 forks source link

feat: upgrade pfm v7.1.2 #408

Open RafilxTenfen opened 8 months ago

RafilxTenfen commented 8 months ago
RafilxTenfen commented 8 months ago

Thanks for the PR. Why is there more functionality being changed, that seems unrelated to the PFM update? I'm asking mostly regarding to changes on the ratelimit module, and also some on the parachain_token for instance.

The PFM fork was importing composable as a package to get the type ParachainIBCTokenInfo but IMO it should not import and be dependant, it should be only the opposite, we should import the PFM as a package and respect their interfaces So, I created one interface to get information from ParachainIBCTokenInfo

https://github.com/RafilxTenfen/ibc-apps/blob/6c70c9f1396d2b90fcb7eda5de1014828ee09070/middleware/packet-forward-middleware/packetforward/types/expected_keepers.go#L52

This way, the PFM fork does not need to import anything from composable and then to comply with the interface from PFM I had to remove getters from ParachainIBCTokenInfo as a pointer (defined in protos), and implement as value

Some of the changes were because I ran make proto-format

dzmitry-lahoda commented 8 months ago

The PFM fork was importing composable as a package to get the type ParachainIBCTokenInfo but IMO it should not import and be dependant, it should be only the opposite, we should import the PFM as a package and respect their interfaces

100%. for sure it is possible via using PFM as types inside custom package, or handling parachain in IBC stack only.

it refatored up IBC stack setup little bit here https://github.com/ComposableFi/composable-cosmos/pull/395 so it is easier to see stack stucture

dzmitry-lahoda commented 8 months ago

@RafilxTenfen invited you to Composable/ibc-apps fork. Please move fork here.

Other than that, mostly ok. So would prefer no fmt noise until noise enforced by ci and no fork solution, but if current thing work - I am ok.

For testing some of us run Composable/composable devnets i needed, so sending with rewrite can be imitated by usual cosmos chains or unit tests ( so not max robust test )

RafilxTenfen commented 8 months ago

Hey @dzmitry-lahoda

@RafilxTenfen invited you to Composable/ibc-apps fork. Please move fork here.

Please, correct me if I am wrong: on this repo composable-cosmos I should update the replace directive from

    github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 => github.com/RafilxTenfen/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240110012424-6c70c9f1396d

to github.com/ComposableFi/ibc-apps/middleware/packet-forward-middleware/v8 +version where it has the changes related TransferMiddlewareKeeper, like the PFM keeper should receive the transfer middleware keeper image

dzmitry-lahoda commented 8 months ago

Hey @dzmitry-lahoda

@RafilxTenfen invited you to Composable/ibc-apps fork. Please move fork here.

Please, correct me if I am wrong: on this repo composable-cosmos I should update the replace directive from

   github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 => github.com/RafilxTenfen/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240110012424-6c70c9f1396d

to github.com/ComposableFi/ibc-apps/middleware/packet-forward-middleware/v8 +version where it has the changes related TransferMiddlewareKeeper, like the PFM keeper should receive the transfer middleware keeper image

just make branch here, instead of using own fork.

instead of => github.com/RafilxTenfen/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240110012424-6c70c9f1396d

do

=> github.com/ComposableFi/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.3-0.20240110012424-6c70c9f1396d

RafilxTenfen commented 8 months ago

Moved PFM fork to https://github.com/ComposableFi/ibc-apps with TransferMiddlewareKeeper

cc @dzmitry-lahoda

hoank101 commented 7 months ago

@tungle-notional