Description
Summary
Allow modules to define module-specific antehandling functions (for now call these ModuleAnteHandler
). Any module that has ModuleAnteHandler
defined can get registered with ModuleManager. These ModuleAnteHandlers can then get run in runTx
. If any ModuleAnteHandler fails, then runTx
will return the result.
Problem Definition
It would allow users to create modules that specify their own antehandler logic and register these functions with the module manager rather than having to recreate all ante-handler logic.
If Antehandler gets refactored to seperate fee and signature logic into separate functions, then this would allow other modules to get their own ante-logic executed in the same way.
Makes it more convenient for users to define custom ante-handling logic on a per-module basis. Rather than creating a new single AnteHandler for every application that may use modules that require custom ante-handling.
Disadvantages: It is possible that this can be abused by modules who will do all message-logic checking in the antehandler. However if developers explicitly want that functionality, it is now available.
Proposal
Add AnteHandler
function to AppModule
interface. Add OrderAnteHandler
functions to Manager
interface.
Remove notion of single overseeing AnteHandler
function. Instead just run all AnteHandler
functions defined by ModuleManager
in runTx
in baseapp.go
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity