Skip to content

Commit

Permalink
add comment explaining stack
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Sep 27, 2024
1 parent 4672c4b commit 705999b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,18 @@ func overrideWasmVariables() {
wasmtypes.MaxProposalWasmSize = wasmtypes.MaxWasmSize
}

// WireICS20PreWasmKeeper Create the IBC Transfer Stack from bottom to top:
// * SendPacket. Originates from the transferKeeper and goes up the stack:
// transferKeeper.SendPacket -> ibc_rate_limit.SendPacket -> ibc_hooks.SendPacket -> channel.SendPacket
// * RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way
// channel.RecvPacket -> ibc_hooks.OnRecvPacket -> ibc_rate_limit.OnRecvPacket -> gmp.OnRecvPacket -> pfm.OnRecvPacket -> transfer.OnRecvPacket
//
// Note that the forward middleware is only integrated on the "receive" direction. It can be safely skipped when sending.
// Note also that the forward middleware is called "router", but we are using the name "pfm" (packet forward middleware) for clarity
// This may later be renamed upstream: https://github.com/ibc-apps/middleware/packet-forward-middleware/issues/10
//
// After this, the wasm keeper is required to be set on both
// app.Ics20WasmHooks AND app.RateLimitingICS4Wrapper
func (app *App) WireICS20PreWasmKeeper(
appCodec codec.Codec,
) {
Expand Down

0 comments on commit 705999b

Please sign in to comment.