-
Notifications
You must be signed in to change notification settings - Fork 129
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
Provider-driven governance #416
Conversation
- Interchain accounts (ICA) module enabled on provider and consumer chains. This allows provider's governance module to register its ICA account and send txs to the consumer chain. - Added authentication module that is required by the ICA controller submodule on the provider chain. - Added adminmodule on the consumer side to enable proposals that passed on provider side to be executed immediately on the consumer side. - Implemented governance for consumer chains on the provider chain + execution of passed proposals on the consumer side. Co-authored by: Stana Miric Dusan Maksimovic
… gov address included into consumer genesis Co-authored by: Stana Miric Dusan Maksimovic
Co-authored by: Stana Miric Dusan Maksimovic
a5b6b78
to
01170a9
Compare
// this allows any type of proposal to be submitted to the admin module (everything is whitelisted) | ||
// projects will implement their functions to define what is allowed for provider and consumer admins | ||
func(ccvgovtypes.Content) bool { return true }, | ||
func(ccvgovtypes.Content) bool { return true }, |
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.
this is nice. Maybe an example of a switch statement with various proposal types to show how you'd include or exclude specific ones would be nice to have?
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.
Yes, we already have similar function for democracy consumer chain that implements whitelisting based on proposal type. We will change this comment to make reference to that function.
164a381
to
397759c
Compare
397759c
to
56c6bde
Compare
@@ -382,6 +432,24 @@ func New( | |||
|
|||
app.EvidenceKeeper = *evidenceKeeper | |||
|
|||
adminRouter := govtypes.NewRouter() | |||
adminRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). |
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.
would this cause problems if the consumer chain also wanted to have the democracy module included? (aka the normal gov module that votes only on specific param changes?)
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.
It would not be a problem since the message submitted to the admin module will be interchain_security.ccv.adminmodule.v1.MsgSubmitProposal(and will go in active proposals queue of admin module), while the message submitted to the governance module would be cosmos.gov.v1beta1.MsgSubmitProposal(and would be added to active/inactive queue of gov module). In endblocker of both module proposals will be executed and handler for the Content of the message will be found based on those routes which can be the same for those 2 types of different msgs because the Content can be the same e.g. ParameterChangeProposal but we will use the same handler to execute the msg content.
In consumer-democracy app we have both admin and gov-democracy modules.
Why are adminmodule and icamauth pasted into our repo? Shouldn't these just be imported from their own repos? If there are modifications needed to these modules, can't you make a fork? |
I was wondering if we could split this into at least 2 smaller PRs? The reasoning behind the split would be:
|
@stana-ethernal @dusan-ethernal Converting this to draft for now, will review after the testnet starts |
Closing as the topic is mostly not releavant other than for occasional discussions. |
This PR allows governance proposals regarding consumer chains to be submitted and voted on the provider chain. If the proposal passes, it will be submitted to the consumer chain and applied immediately in first EndBlock(). To achieve this, implementation leverages Interchain Accounts (ICA) and Admin modules. The main changes are:
@okwme we would be thankful if you could take a look at how we wired up everything.
cc @stana-ethernal as co-author