Skip to content

Move callbacks middleware down the middleware stack #4444

Open

Description

Summary

Wire up the Callbacks Middleware so that it is the middle app in the middleware stack.

Problem Definition

See this thread for a detailed explanation. The main issue with the current setup is that it wouldn't have worked if callbacks had a version.

  • Change the wiring of the transfer stack in callbacks/simapp
  • Change the wiring of the icacontroller stack in callbacks/simapp
  • Update the callbacks middleware documentation integration.md

Proposal

For example, the ICA controller stack would look like:

    var icaControllerStack porttypes.IBCModule
    icaControllerStack = icacontroller.NewIBCMiddleware(nil, app.ICAControllerKeeper)
    icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas)
    // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper
    app.ICAControllerKeeper.WithICS4Wrapper(icaControllerStack.(porttypes.Middleware))
    
    icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper)

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    callbacks middlewareIssues for callbacks middlewaretype: refactorArchitecture, code or CI improvements that may or may not tackle technical debt.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions