Skip to content
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

make gov composable #14403

Open
tac0turtle opened this issue Dec 23, 2022 · 16 comments
Open

make gov composable #14403

tac0turtle opened this issue Dec 23, 2022 · 16 comments
Assignees

Comments

@tac0turtle
Copy link
Member

tac0turtle commented Dec 23, 2022

Summary

Currently x/gov is one large module and it is a governance model forced onto users. Instead we should refactor x/gov to have components that can be composed into a governance module and/or groups module. There can be many things reused across the 2 modules.

Problem Definition

gov is a single model, instead of a composable module for different modules

Proposal

Rewrite gov to have components and can be composed into an application.

@robert-zaremba
Copy link
Collaborator

How would that look like? What kind of independent components do you see? Are the components going to be independent Go modules?

@tac0turtle
Copy link
Member Author

I don't think the components need to be in their own go.mods but the gov module today should be the default one provided but applications can provide their own custom logic of tallys and other things to customise gov while keeping proposal and some other things consistent

@hxrts
Copy link
Contributor

hxrts commented Dec 24, 2022

Any way you take this, here's an old draft from the gov product WG for reference: https://docs.google.com/document/d/18zmqL1ujCybtHsccw_jTZQFg-_Q77qubtdjlEfQGduo/edit#

@alexanderbez
Copy link
Contributor

alexanderbez commented Dec 26, 2022

I think a DAO-DAO style mechanism would be an interesting thought experiment. I don't know much about how the end product will look like, but I do strongly agree the current module and design is much too rigid for how governance is attempting to be conducted today.

@robert-zaremba
Copy link
Collaborator

Maybe, instead of breaking the existing x/gov we should create a new one?
In my opinion x/gov should be solid and well composable with existing messages (as it is now) - and it should be a foundation of the chain governance.

We can have x/dao as an experiment of more elastic governance model, maybe working with groups and dynamic membership (like coin holding).

@julienrbrt
Copy link
Member

Maybe, instead of breaking the existing x/gov we should create a new one? In my opinion x/gov should be solid and well composable with existing messages (as it is now) - and it should be a foundation of the chain governance.

We can have x/dao as an experiment of more elastic governance model, maybe working with groups and dynamic membership (like coin holding).

Wasn't the group module supposed to be an alternative to DAO DAO?
ref: https://blog.cosmos.network/secret-powers-what-do-the-upcoming-groups-and-gov-modules-enable-964a22f0a9cd

@alexanderbez
Copy link
Contributor

What I'm getting at here in this context isn't message execution and the general execution model -- but more so the rules around execution, i.e. how and when are proposals executed. This is mainly the core bit of x/gov that is not composable and is too rigid.

@tac0turtle
Copy link
Member Author

I think making gov composable and the default working the same as now is not hard, it would be 2-3 weeks of work to make it happen

@hxrts
Copy link
Contributor

hxrts commented Dec 27, 2022

the rules around execution, i.e. how and when are proposals executed. This is mainly the core bit of x/gov that is not composable and is too rigid.

The original idea was to migrate gov to use the decision policy system from groups.

@alexanderbez
Copy link
Contributor

So then based on what @hxrts is saying, is there really anything to do here @tac0turtle?

@tac0turtle
Copy link
Member Author

yes, first we should make components of groups and gov reusable. Meaning there should be a single proposal type, then we should remake gov as a subset of groups meaning that a chain can say they want x and y. Saying groups is a replacement for gov is not sufficient since it's not in the current design. While groups is better there is a little amount of code that can be reused for other things that would allow applications to compose governance or even groups. Right now we have duplicate proposal types, and other types across groups and gov, while making some of these components reusable would reduce the amount of code and clean up the designs

@hxrts
Copy link
Contributor

hxrts commented Dec 28, 2022

@ValarDragon what are you feelings about the groups group policy/decision policy architecture? https://github.com/cosmos/cosmos-sdk/tree/main/x/group#concepts

I believe group policies can fulfil most of what you were looking for from typed proposals, no?

@tac0turtle
Copy link
Member Author

what if we made a dao package of reusable types like proposal, tally, etc.. that then is used to compose gov and groups?

(ado package can be called something else )

@julienrbrt
Copy link
Member

what if we made a dao package of reusable types like proposal, tally, etc.. that then is used to compose gov and groups?

(ado package can be called something else )

If groups was supposed to be the replacement it makes to have gov import group actually instead of a third package imo.

@tac0turtle
Copy link
Member Author

we can do that, I was thinking groups is one implementation but others could want to do their own.

@aaronc
Copy link
Member

aaronc commented Jan 3, 2023

Generally agree with the direction of merging gov and group as originally planned. We need to think through how to refactor decision policies to cover gov tallying. That was the part we didn't have bandwidth to align on previously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants