Skip to content

feat: integrate v4 of the packet forward middleware #839

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

Merged
merged 4 commits into from
Aug 19, 2023
Merged

feat: integrate v4 of the packet forward middleware #839

merged 4 commits into from
Aug 19, 2023

Conversation

jtieri
Copy link
Contributor

@jtieri jtieri commented Jul 7, 2023

Description

This PR integrates v4 of the packet-forward-middleware from the ibc-apps repo. A summary of the integration path and some of the configurable options in the PFM can be found here.

Testing

To assert that the PFM is working as intended I have included an e2e test which can be found in the directory e2e. The e2e test utilizes interchaintest and makes use of a locally built Docker image. I have included some Make commands to simplify setting up heighliner, building the Docker image and running the tests.

To run the test with the changes in this PR follow the directions below.

  1. Clone the forked repo and checkout my feature branch
git clone https://github.com/jtieri/stargaze.git && git checkout feat/packet-forward-middleware
  1. Build the local Docker image, this requires installing heighliner
make get-heighliner && make local-image
  1. Run the e2e test
make test-e2e

The testing setup could be changed in any way you see fit and has mostly been included here as a means for verifying that the integration of the PFM is successful. Feel free to edit or completely remove this component of the PR!

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.17% 🎉

Comparison is base (4c3715f) 11.94% compared to head (e34950c) 12.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #839      +/-   ##
==========================================
+ Coverage   11.94%   12.12%   +0.17%     
==========================================
  Files         103      103              
  Lines       14324    14353      +29     
==========================================
+ Hits         1711     1740      +29     
  Misses      12499    12499              
  Partials      114      114              
Files Changed Coverage Δ
app/app.go 85.74% <100.00%> (+0.90%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shanev shanev requested review from spoo-bar and jhernandezb July 10, 2023 13:45

firstHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainA.Config().Bech32Prefix, transfertypes.GetEscrowAddress(abChan.PortID, abChan.ChannelID))
secondHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainB.Config().Bech32Prefix, transfertypes.GetEscrowAddress(bcChan.PortID, bcChan.ChannelID))
thirdHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainC.Config().Bech32Prefix, transfertypes.GetEscrowAddress(cdChan.PortID, abChan.ChannelID))
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldnt this be cdChan.Channeld? 🤔

Suggested change
thirdHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainC.Config().Bech32Prefix, transfertypes.GetEscrowAddress(cdChan.PortID, abChan.ChannelID))
thirdHopEscrowAccount := sdk.MustBech32ifyAddressBytes(chainC.Config().Bech32Prefix, transfertypes.GetEscrowAddress(cdChan.PortID, cdChan.ChannelID))

@jhernandezb jhernandezb merged commit 1baf9d4 into public-awesome:main Aug 19, 2023
mergify bot pushed a commit that referenced this pull request Aug 19, 2023
* feat: integrate v4 of the packet forward middleware

* test: add e2e testing for pfm via interchaintest

---------

Co-authored-by: Spoorthi <[email protected]>
Co-authored-by: Jorge Hernandez <[email protected]>
(cherry picked from commit 1baf9d4)
jhernandezb added a commit that referenced this pull request Aug 21, 2023
…pr-839

feat: integrate v4 of the packet forward middleware (backport #839)
spoo-bar added a commit that referenced this pull request Aug 25, 2023
* feat: integrate v4 of the packet forward middleware

* test: add e2e testing for pfm via interchaintest

---------

Co-authored-by: Spoorthi <[email protected]>
Co-authored-by: Jorge Hernandez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants