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

[v12] packet forward middleware #513

Merged
merged 3 commits into from
Jan 17, 2023
Merged

[v12] packet forward middleware #513

merged 3 commits into from
Jan 17, 2023

Conversation

agouin
Copy link
Contributor

@agouin agouin commented Jan 16, 2023

Integrates v4 of https://github.com/strangelove-ventures/packet-forward-middleware into the transfer middleware stack to enable atomic multi-hop through Juno.

callback flow: hooks -> ics29 fee -> packet forward -> transfer module
send packet direction: transfer module -> packet forward -> hooks -> channel

ibctest e2e test here

Copy link
Contributor

@Reecepbcups Reecepbcups left a comment

Choose a reason for hiding this comment

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

Needs upgrade set in app/upgrades/v12

constants.go -> packetforwardtypes.StoreKey
and
upgrades.go -> keepers.PacketForwardKeeper.SetParams(ctx, packetforwardtypes.DefaultParams()) (very bottom)

Upgrade from v11 -> v12 worked for me after that

junod q ibc-router params --node http://localhost:26657
fee_percentage: "0.000000000000000000"

junod tx ibc-transfer transfer transfer channel-0 "juno1hj5fveer5cjtn4wd6wstzugjfdxzl0xps73ftl|transfer/channel-1:juno10c3slrqx3369mfsr9670au22zvq082jaej8ve4" 111ujuno $CHAIN_A_ARGS --packet-timeout-height 0-0

When I try locally, doesn't seem to actually work. hermes both ways. Could be me doing some wrong though.

Tx goes through (initial IBC send) then it returns back, never gets to other channel (normal ibc-transfers work to both).
Are there example bash scripts anywhere?

@agouin
Copy link
Contributor Author

agouin commented Jan 16, 2023

Upgrade from v11 -> v12 worked for me after that

Thank you, I applied those changes.

junod tx ibc-transfer transfer transfer channel-0 "juno1hj5fveer5cjtn4wd6wstzugjfdxzl0xps73ftl|transfer/channel-1:juno10c3slrqx3369mfsr9670au22zvq082jaej8ve4" 111ujuno $CHAIN_A_ARGS --packet-timeout-height 0-0

The packet forward middleware no longer uses an overloaded receiver. The migration is documented in this PR

We don't have example bash scripts, but you can run the packet forward middleware e2e test in ibctest and swap out for a local/remote juno image.

@Reecepbcups Reecepbcups enabled auto-merge (squash) January 16, 2023 21:32
@Reecepbcups Reecepbcups added the review me Review me for merge label Jan 16, 2023
@Reecepbcups Reecepbcups changed the title Integrate packet forward middleware [v12] packet forward middleware Jan 16, 2023
@faddat
Copy link
Contributor

faddat commented Jan 17, 2023

As implemented doesn't this break IBC hooks?

Copy link
Contributor

@faddat faddat left a comment

Choose a reason for hiding this comment

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

I will resolve this change request if I can figure out what the changes are doing here

@Reecepbcups
Copy link
Contributor

As implemented doesn't this break IBC hooks?

@faddat - It does not break IBC-Hooks, seems to work just fine:
image

@faddat
Copy link
Contributor

faddat commented Jan 17, 2023

ok. I was about to do the check you've now done. lgtm

@Reecepbcups Reecepbcups merged commit 234c05d into CosmosContracts:main Jan 17, 2023
@Reecepbcups Reecepbcups removed the review me Review me for merge label Jan 17, 2023
@faddat faddat mentioned this pull request Feb 6, 2023
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.

3 participants