-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Pass in sdk.Context to router.Route() #5452
Conversation
Mhhhh, something about routers being stateful doesn't sit right with me. Is the point to disable certain message routes? Typically, this is done via parameters but that's not the best UX, I agree. There is also this issue on Hierarchical Msg Routing, which I think has some overlap here. Would like to get other opinions here @AdityaSripal @fedekunze |
Well, that's one example, which I wrote a module for. There are probably other reasons to do it as well such as upgrading a specific module (assuming modules are hot-loaded using CosmWasm or something).
Also, genesis parameters can't be changed. I want governance to be able to update on an active chain. I do use the paramstore in the togglerouter module, but the router needs the |
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
ref: #5455 (comment) I don't have any strong objections here. Concept ACK unless others can state strong objective reasons for not going forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit, otherwise ACK.
…-sdk into I5455-stateful-router
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Towards stateful router
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Codecov Report
@@ Coverage Diff @@
## master #5452 +/- ##
==========================================
+ Coverage 54.4% 54.42% +0.02%
==========================================
Files 313 313
Lines 18850 18854 +4
==========================================
+ Hits 10255 10261 +6
+ Misses 7808 7806 -2
Partials 787 787
|
Adding this will allow apps to create more customizable msg Routers. For example, this one I wrote here that allows governance to toggle on and off certain routes.
For a router, that doesn't want to make use of the ctx (like the default one in baseapp), it can just ignore it.
closes: #5455
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)