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

feat: upgrade pfm v7.1.2 #408

Closed

Conversation

RafilxTenfen
Copy link

@RafilxTenfen RafilxTenfen commented Jan 10, 2024

  • Update packet-forward-middleware to v7.1.2
    • PR open to composable fork
  • Add test targets to makefile

@RafilxTenfen RafilxTenfen marked this pull request as ready for review January 10, 2024 03:36
@blasrodri blasrodri requested review from RustNinja and faddat January 12, 2024 13:37
go.mod Outdated Show resolved Hide resolved
scripts/protocgen.sh Outdated Show resolved Hide resolved
Copy link

@blasrodri blasrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RafilxTenfen
Copy link
Author

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.

  • ratelimit module and parachain_token

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
Copy link
Contributor

dzmitry-lahoda commented Jan 15, 2024

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 #395 so it is easier to see stack stucture

go.mod Outdated Show resolved Hide resolved
@dzmitry-lahoda
Copy link
Contributor

@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 )

x/transfermiddleware/keeper/keeper.go Outdated Show resolved Hide resolved
x/transfermiddleware/keeper/relay.go Outdated Show resolved Hide resolved
@RafilxTenfen
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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

cc @dzmitry-lahoda

Copy link
Contributor

@dzmitry-lahoda dzmitry-lahoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. thank you. just make sure that ci state after changes is as good as it was before. thank you.

@hoank101
Copy link
Collaborator

@tungle-notional

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

Successfully merging this pull request may close these issues.

6 participants